Skip to content

Commit 550691c

Browse files
committed
fix nix flake [build]
1 parent dc83e77 commit 550691c

3 files changed

Lines changed: 30 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Install Wails (Linux)
4949
if: runner.os == 'Linux'
50-
run: nix-shell -p go --run "go install github.com/wailsapp/wails/v2/cmd/wails@latest"
50+
run: nix develop --command go install github.com/wailsapp/wails/v2/cmd/wails@latest
5151

5252
- name: Install frontend deps
5353
run: bun install
@@ -59,4 +59,4 @@ jobs:
5959

6060
- name: Build (Linux)
6161
if: runner.os == 'Linux'
62-
run: nix-shell -p pkg-config gtk3 webkit2gtk_4_0 gobject-introspection --run "export PATH=$HOME/go/bin:$PATH && wails build"
62+
run: nix develop --command wails build

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ jobs:
7575
run: npm install -g bun
7676

7777
- name: Install Wails via Nix
78-
run: nix-shell -p go --run "go install github.com/wailsapp/wails/v2/cmd/wails@latest"
78+
run: nix develop --command go install github.com/wailsapp/wails/v2/cmd/wails@latest
7979

8080
- name: Install frontend deps
8181
run: bun install
8282
working-directory: frontend
8383

8484
- name: Build with Nix
85-
run: |
86-
nix-shell -p pkg-config gtk3 webkit2gtk_4_0 gobject-introspection --run "export PATH=$HOME/go/bin:$PATH && wails build -clean"
85+
run: nix develop --command wails build -clean
8786

8887
- name: Rename binary
8988
run: mv build/bin/thunder thunder-linux-amd64

flake.nix

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
description = "Thunder build environment";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
6+
};
7+
8+
outputs = { self, nixpkgs }:
9+
let
10+
pkgs = nixpkgs.legacyPackages.x86_64-linux;
11+
in {
12+
devShells.x86_64-linux.default = pkgs.mkShell {
13+
buildInputs = with pkgs; [
14+
go
15+
pkg-config
16+
gtk3
17+
webkitgtk_4_0
18+
gobject-introspection
19+
];
20+
21+
shellHook = ''
22+
export PATH=$HOME/go/bin:$PATH
23+
'';
24+
};
25+
};
26+
}

0 commit comments

Comments
 (0)