mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-07-20 17:49:18 +00:00
nix : use optionalAttrs for env mkDerivation attrset argument (#14726)
This commit is contained in:
@ -47,6 +47,7 @@ let
|
|||||||
inherit (lib)
|
inherit (lib)
|
||||||
cmakeBool
|
cmakeBool
|
||||||
cmakeFeature
|
cmakeFeature
|
||||||
|
optionalAttrs
|
||||||
optionals
|
optionals
|
||||||
strings
|
strings
|
||||||
;
|
;
|
||||||
@ -197,7 +198,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Environment variables needed for ROCm
|
# Environment variables needed for ROCm
|
||||||
env = optionals useRocm {
|
env = optionalAttrs useRocm {
|
||||||
ROCM_PATH = "${rocmPackages.clr}";
|
ROCM_PATH = "${rocmPackages.clr}";
|
||||||
HIP_DEVICE_LIB_PATH = "${rocmPackages.rocm-device-libs}/amdgcn/bitcode";
|
HIP_DEVICE_LIB_PATH = "${rocmPackages.rocm-device-libs}/amdgcn/bitcode";
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user