forked from Overworldai/Biome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
53 lines (48 loc) · 1.24 KB
/
Copy pathshell.nix
File metadata and controls
53 lines (48 loc) · 1.24 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
{ pkgs ? import <nixpkgs> {} }:
let
electronDeps = with pkgs; [
glib
nss
nspr
atk
cups
dbus
libdrm
gtk3
pango
cairo
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb
mesa
libgbm
libGL
libxkbcommon
expat
alsa-lib
at-spi2-atk
at-spi2-core
xorg.libxshmfence
];
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
];
buildInputs = electronDeps ++ [ pkgs.squashfsTools ];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (electronDeps ++ [
pkgs.stdenv.cc.cc.lib # libstdc++.so.6 (needed by PyTorch native extensions)
"/run/opengl-driver" # libcuda.so, libnvidia-ml.so (NVIDIA driver)
]);
# Triton calls /sbin/ldconfig to find libcuda.so, which doesn't exist on NixOS.
# Point it directly at the driver library path instead.
TRITON_LIBCUDA_PATH = "/run/opengl-driver/lib";
# The UV-managed venv's sysconfig reports /run/current-system/sw/include/python3.13
# as the include path, but on NixOS the actual Python.h lives in the nix store.
# Triton needs this to compile CUDA utility C extensions with gcc.
C_INCLUDE_PATH = "${pkgs.python313}/include/python3.13";
}