-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
35 lines (32 loc) · 1.02 KB
/
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
let
system = "x86_64-linux";
nixpie = import <nixpie>;
inherit (nixpie.inputs.nixpkgs) lib;
inherit (lib) attrValues;
pkgs = import nixpie.inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
overlays = (attrValues nixpie.overlays) ++ [ nixpie.overrides.${system} ];
};
in
pkgs.mkShell {
name = "cuda-env-shell";
buildInputs = with pkgs; [
git gitRepo gnupg autoconf curl
procps gnumake utillinux m4 gperf unzip cmake
linuxPackages.nvidia_x11
libGLU libGL
xorg.libXi xorg.libXmu freeglut
xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib libpng pngpp tbb gbenchmark gtest
opencv
nlohmann_json
ncurses5 stdenv.cc binutils
];
shellHook = with pkgs;''export CUDA_PATH=${pkgs.cudaPackages.cudatoolkit}
export LD_LIBRARY_PATH=${linuxPackages.nvidia_x11}/lib:${ncurses5}/lib:${libkrb5}/lib:$LD_LIBRARY_PATH
export EXTRA_LDFLAGS="-L/lib -L${linuxPackages.nvidia_x11}/lib $EXTRA_LDFLAGS"
export EXTRA_CCFLAGS="-I/usr/include $EXTRA_CCFLAGS"
'';
}