forked from virchau13/automatic1111-webui-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
impl.nix
43 lines (40 loc) · 1 KB
/
impl.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
41
42
43
{ pkgs, isCUDA ? true, ... }:
let
hardware_deps = with pkgs;
if isCUDA then [
cudatoolkit
linuxPackages.nvidia_x11
xorg.libXi
xorg.libXmu
freeglut
xorg.libXext
xorg.libX11
xorg.libXv
xorg.libXrandr
zlib
# for xformers
gcc
] else [
rocm-runtime
pciutils
];
in
pkgs.mkShell rec {
name = "stable-diffusion-webui";
buildInputs = with pkgs;
hardware_deps ++ [
git # The program instantly crashes if git is not present, even if everything is already downloaded
python310
stdenv.cc.cc.lib
stdenv.cc
ncurses5
binutils
gitRepo gnupg autoconf curl
procps gnumake util-linux m4 gperf unzip
libGLU libGL
glib
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
CUDA_PATH = pkgs.lib.optionalString isCUDA pkgs.cudatoolkit;
EXTRA_LDFLAGS = pkgs.lib.optionalString isCUDA "-L${pkgs.linuxPackages.nvidia_x11}/lib";
}