diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index 4e5fd00a555..b2b6225a1db 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -13,6 +13,7 @@ cudaPackages, autoAddDriverRunpath, darwin, + apple-sdk ? null, rocmPackages, vulkan-headers, vulkan-loader, @@ -77,15 +78,17 @@ let ''; # apple_sdk is supposed to choose sane defaults, no need to handle isAarch64 - # separately + # separately. + # Modern Nixpkgs (25.05+) provides a unified 'apple-sdk' derivation. + # Legacy Nixpkgs (24.05/24.11) uses 'darwin.apple_sdk.frameworks'. darwinBuildInputs = - with darwin.apple_sdk.frameworks; - [ - Accelerate - CoreVideo - CoreGraphics - ] - ++ optionals useMetalKit [ MetalKit ]; + if apple-sdk != null then + # Unified SDK: single package provides all frameworks + [ apple-sdk ] + else + with darwin.apple_sdk.frameworks; + [ Accelerate CoreVideo CoreGraphics ] + ++ lib.optional useMetalKit MetalKit; cudaBuildInputs = with cudaPackages; [ cuda_cudart