nix-shell: use addToSearchPath

thx to @SomeoneSerge for the suggestion!
This commit is contained in:
Michael Hueschen 2024-01-22 16:44:10 -07:00 committed by Someone
parent bf63d695b8
commit c9b316c78f

View 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"
'';
};