nix : use optionalAttrs for env mkDerivation attrset argument (#14726)
This commit is contained in:
parent
cb887f1bc1
commit
760b4484e3
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue