-
Notifications
You must be signed in to change notification settings - Fork 2
/
shell.nix
40 lines (36 loc) · 814 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.11.zip") { } }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
# backend
go
gopls
rustc
cargo
delve
pkg-config
openssl
# others
direnv
vscode.fhs
go-task
_1password
];
hardeningDisable = [ "fortify" ];
shellHook = ''
if [ ! -f ./twgpu/bin/twgpu-map-photography ]; then
${pkgs.cargo}/bin/cargo install --root=./twgpu twgpu-tools
fi
export PATH="$PWD/twgpu/bin:$PATH"
LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${
with pkgs;
lib.makeLibraryPath [
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
]
}"
export LD_LIBRARY_PATH
'';
}