From f8ea911f7c4e44b167d4b1b51f6d00ebd93e1ed1 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 14:29:02 -0800 Subject: [PATCH 1/5] lib.customisation.callPackageWith: use throw, not abort --- lib/customisation.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/customisation.nix b/lib/customisation.nix index dec1ab9f4faa..5e290230ca4e 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -200,7 +200,9 @@ rec { # Only show the error for the first missing argument error = errorForArg missingArgs.${head (attrNames missingArgs)}; - in if missingArgs == {} then makeOverridable f allArgs else abort error; + in if missingArgs == {} + then makeOverridable f allArgs + else throw "lib.customisation.callPackageWith: ${error}"; /* Like callPackage, but for a function that returns an attribute From bffbf8bb537a06075e06d4f6cee306e3704055cc Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:36 -0800 Subject: [PATCH 2/5] test.cuda: fix broken eval --- pkgs/test/cuda/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix index 7989e4e2b7d2..c7b790e35e25 100644 --- a/pkgs/test/cuda/default.nix +++ b/pkgs/test/cuda/default.nix @@ -1,7 +1,7 @@ { callPackage }: rec { - cuda-samplesPackages = callPackage ./cuda-samples { }; + cuda-samplesPackages = callPackage ./cuda-samples/generic.nix { }; inherit (cuda-samplesPackages) cuda-samples_cudatoolkit_10 cuda-samples_cudatoolkit_10_0 @@ -14,7 +14,7 @@ rec { cuda-samples_cudatoolkit_11_3 cuda-samples_cudatoolkit_11_4; - cuda-library-samplesPackages = callPackage ./cuda-library-samples { }; + cuda-library-samplesPackages = callPackage ./cuda-library-samples/generic.nix { }; inherit (cuda-library-samplesPackages) cuda-library-samples_cudatoolkit_10 cuda-library-samples_cudatoolkit_10_1 From e30975f8324fb8361198890c3227f18355f45465 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:46 -0800 Subject: [PATCH 3/5] darwin.iosSdkPkgs: fix broken eval --- pkgs/os-specific/darwin/xcode/sdk-pkgs.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index 50eb50ea6b78..45cb12b89f4c 100644 --- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -22,8 +22,8 @@ rec { type = "derivation"; outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk"; - platform = stdenv.targetPlatform.xcodePlatform; - version = stdenv.targetPlatform.sdkVer; + platform = stdenv.targetPlatform.xcodePlatform or ""; + version = stdenv.targetPlatform.sdkVer or ""; }; binutils = wrapBintoolsWith { From 72985fe2d139b92137824c4ca0fcf7831a19fd9d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:47:36 -0800 Subject: [PATCH 4/5] cudaPackages_10.cudaFlags: fix broken eval --- pkgs/development/compilers/cudatoolkit/flags.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/cudatoolkit/flags.nix b/pkgs/development/compilers/cudatoolkit/flags.nix index 3b88ebc708b4..be1d98e87122 100644 --- a/pkgs/development/compilers/cudatoolkit/flags.nix +++ b/pkgs/development/compilers/cudatoolkit/flags.nix @@ -108,7 +108,7 @@ let # archNames :: List String # E.g. [ "Turing" "Ampere" ] - archNames = lists.unique (builtins.map (cap: cudaComputeCapabilityToName.${cap}) cudaCapabilities); + archNames = lists.unique (builtins.map (cap: cudaComputeCapabilityToName.${cap} or (throw "missing cuda compute capability")) cudaCapabilities); # realArches :: List String # The real architectures are physical architectures supported by the CUDA version. From 310cda5a0c679f62a86151d55ba964de72e80ba7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 29 Nov 2023 19:19:56 -0800 Subject: [PATCH 5/5] mkAdoptopenjdk: allow missing {jre,jdk}-openj9 attribute --- pkgs/top-level/java-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/java-packages.nix b/pkgs/top-level/java-packages.nix index ad13447fcbac..88c95457afee 100644 --- a/pkgs/top-level/java-packages.nix +++ b/pkgs/top-level/java-packages.nix @@ -38,7 +38,9 @@ in { jdk-hotspot = callPackage package.jdk-hotspot {}; jre-hotspot = callPackage package.jre-hotspot {}; + } // lib.optionalAttrs (package?jdk-openj9) { jdk-openj9 = callPackage package.jdk-openj9 {}; + } // lib.optionalAttrs (package?jre-openj9) { jre-openj9 = callPackage package.jre-openj9 {}; };