Skip to content

Commit 9fff3e4

Browse files
committed
feat: add cuda-shell
1 parent d769499 commit 9fff3e4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

nix-shell/cuda-shell.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Run with `nix-shell cuda-shell.nix`
2+
{ pkgs ? import <nixpkgs> {} }:
3+
pkgs.mkShell {
4+
name = "cuda-env-shell";
5+
buildInputs = with pkgs; [
6+
git gitRepo gnupg autoconf curl
7+
procps gnumake util-linux m4 gperf unzip
8+
cudatoolkit linuxPackages.nvidia_x11
9+
libGLU libGL
10+
xorg.libXi xorg.libXmu freeglut
11+
xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib
12+
ncurses5 stdenv.cc binutils
13+
];
14+
shellHook = ''
15+
export CUDA_PATH=${pkgs.cudatoolkit}
16+
# export LD_LIBRARY_PATH=${pkgs.linuxPackages.nvidia_x11}/lib:${pkgs.ncurses5}/lib
17+
export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
18+
export EXTRA_CCFLAGS="-I/usr/include"
19+
'';
20+
}
21+

0 commit comments

Comments
 (0)