aquafire / stable-diffusion-cpp-shell.nix

Last active 6 months ago

Like 0

aquafire revised this gist 9 months ago · ec9a509

1 file changed, 18 insertions

stable-diffusion-cpp-shell.nix (file created)
@@ -0,0 +1,18 @@
1 + { pkgs ? import <nixpkgs> {} }:
2 +
3 + pkgs.mkShell {
4 + nativeBuildInputs = with pkgs; [
5 + cmake gcc gnumake git openblas clblast
6 + vulkan-loader vulkan-tools vulkan-headers vulkan-validation-layers
7 + glslang shaderc spirv-tools pkg-config
8 + ];
9 +
10 + shellHook = ''
11 + export CMAKE_PREFIX_PATH="${pkgs.vulkan-loader}:${pkgs.vulkan-headers}:${pkgs.glslang}"
12 + export PKG_CONFIG_PATH="${pkgs.vulkan-loader}/share/pkgconfig:${pkgs.vulkan-headers}/share/pkgconfig:${pkgs.glslang}/lib/pkgconfig:$PKG_CONFIG_PATH"
13 + export LD_LIBRARY_PATH="${pkgs.vulkan-loader}/lib:$LD_LIBRARY_PATH"
14 + export CMAKE_BUILD_PARALLEL_LEVEL=1
15 + pkg-config --modversion vulkan # тест
16 + '';
17 + }
18 +