Skip to content

Commit 4e17ff7

Browse files
committed
add flake
force add a .vscode/launch.json NOTE: remember to yarn link the flake branch (no-gpu) flake add gl stuff NOT SURE WHY GL IS STILL NEEDED AFTER LINK more stuff into flake to make tests pass
1 parent c63c423 commit 4e17ff7

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

.envrc

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ yarn-error.log
5151

5252
# We use .node-version
5353
/.tool-versions
54+
.direnv/

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
description = "Template for a direnv shell, with NodeJS";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/24.05";
6+
};
7+
8+
outputs = { self, nixpkgs }:
9+
let
10+
system = "x86_64-linux";
11+
pkgs = nixpkgs.legacyPackages.${system};
12+
libs = with pkgs; [
13+
libuuid
14+
xorg.libX11
15+
xorg.libXext
16+
];
17+
in
18+
{
19+
devShells.${system}.default = pkgs.mkShell {
20+
packages = with pkgs; [
21+
nodejs_20
22+
yarn-berry
23+
24+
# Additional libs needed by yarn when installing
25+
pkg-config
26+
xorg.libX11
27+
xorg.libXi
28+
libGL
29+
30+
python310
31+
xorg.libXext
32+
33+
gcc11
34+
];
35+
shellHook = ''
36+
# Inject the libraries
37+
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib/
38+
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath libs}:$LD_LIBRARY_PATH"
39+
'';
40+
};
41+
};
42+
}
43+
44+

0 commit comments

Comments
 (0)