about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/customisation.nix4
-rw-r--r--pkgs/development/compilers/cudatoolkit/flags.nix2
-rw-r--r--pkgs/os-specific/darwin/xcode/sdk-pkgs.nix4
-rw-r--r--pkgs/test/cuda/default.nix4
-rw-r--r--pkgs/top-level/java-packages.nix2
5 files changed, 10 insertions, 6 deletions
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
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.
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 {
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
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  {};
     };