Skip to content

Commit 53b2b95

Browse files
Create a devshell for nix user
NixOS/nix allow one to create a dev shell which automatically loads in all dependencies when entering the projects directory This commit adds such a shell
1 parent 33862c5 commit 53b2b95

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_nix

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ dist
77
# Specifically allow the provided code workspace with the multi-root workaround
88
!.vscode/SatisfactoryModManager.code-workspace
99

10+
# Devtools downloaded by direnv
11+
.direnv
12+
1013
# Created by https://www.toptal.com/developers/gitignore/api/goland+all,go,visualstudiocode
1114
# Edit at https://www.toptal.com/developers/gitignore?templates=goland+all,go,visualstudiocode
1215

shell.nix

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
let
2+
# This is the commit smm was added to nixpkgs, somewhen after this, something broke packaging.
3+
# TODO: fix the build failure on more recent versions and then update the hash to the latest tag
4+
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/a7808b41c3cfd040fbe03e12a68654db3c02d5bc";
5+
pkgs = import nixpkgs { config = {}; overlays = []; };
6+
7+
in
8+
pkgs.mkShellNoCC {
9+
nativeBuildInputs =
10+
let
11+
wails' = pkgs.wails.override { nodejs = pkgs.nodejs_20; };
12+
in
13+
with pkgs.buildPackages; [
14+
wails'
15+
pnpm_8
16+
vite
17+
wrapGAppsHook3
18+
];
19+
buildInputs = with pkgs.buildPackages; [
20+
glib-networking
21+
];
22+
23+
shellHook = ''
24+
export GIO_MODULE_DIR=${pkgs.glib-networking}/lib/gio/modules/
25+
'';
26+
}

0 commit comments

Comments
 (0)