nix : use optionalAttrs for env mkDerivation attrset argument (#14726)

This commit is contained in:
Wroclaw 2025-07-18 00:18:16 +02:00 committed by GitHub
parent cb887f1bc1
commit 760b4484e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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";
}; };