]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
nix-shell: use addToSearchPath
authorMichael Hueschen <redacted>
Mon, 22 Jan 2024 23:44:10 +0000 (16:44 -0700)
committerSomeone <redacted>
Wed, 24 Jan 2024 12:39:29 +0000 (12:39 +0000)
thx to @SomeoneSerge for the suggestion!

.devops/nix/package.nix

index 91ddb88907504ea4ae25b4938151145b26b90089..a868a9a6176f82bce8bfb38978a6ddc6c400af1c 100644 (file)
@@ -221,15 +221,12 @@ effectiveStdenv.mkDerivation (
         ;
 
       shell = mkShell {
-        NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
-          effectiveStdenv.cc.cc
-        ];
         name = "shell-${finalAttrs.finalPackage.name}";
         description = "contains numpy and sentencepiece";
         buildInputs = [ llama-python ];
         inputsFrom = [ finalAttrs.finalPackage ];
         shellHook = ''
-          export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
+          addToSearchPath "LD_LIBRARY_PATH" "${lib.getLib effectiveStdenv.cc.cc}/lib"
         '';
       };