Merge pull request #271123 from Mic92/pr/release-outpaths-

Eval fixes from release-attrpaths-superset.nix optimization (part 2)
This commit is contained in:
Silvan Mosberger 2023-12-01 01:03:07 +01:00 committed by GitHub
commit 10bd922e3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View file

@ -200,7 +200,9 @@ rec {
# Only show the error for the first missing argument # Only show the error for the first missing argument
error = errorForArg missingArgs.${head (attrNames missingArgs)}; 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 /* Like callPackage, but for a function that returns an attribute

View file

@ -108,7 +108,7 @@ let
# archNames :: List String # archNames :: List String
# E.g. [ "Turing" "Ampere" ] # 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 # realArches :: List String
# The real architectures are physical architectures supported by the CUDA version. # The real architectures are physical architectures supported by the CUDA version.

View file

@ -22,8 +22,8 @@ rec {
type = "derivation"; type = "derivation";
outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk"; outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk";
platform = stdenv.targetPlatform.xcodePlatform; platform = stdenv.targetPlatform.xcodePlatform or "";
version = stdenv.targetPlatform.sdkVer; version = stdenv.targetPlatform.sdkVer or "";
}; };
binutils = wrapBintoolsWith { binutils = wrapBintoolsWith {

View file

@ -1,7 +1,7 @@
{ callPackage }: { callPackage }:
rec { rec {
cuda-samplesPackages = callPackage ./cuda-samples { }; cuda-samplesPackages = callPackage ./cuda-samples/generic.nix { };
inherit (cuda-samplesPackages) inherit (cuda-samplesPackages)
cuda-samples_cudatoolkit_10 cuda-samples_cudatoolkit_10
cuda-samples_cudatoolkit_10_0 cuda-samples_cudatoolkit_10_0
@ -14,7 +14,7 @@ rec {
cuda-samples_cudatoolkit_11_3 cuda-samples_cudatoolkit_11_3
cuda-samples_cudatoolkit_11_4; 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) inherit (cuda-library-samplesPackages)
cuda-library-samples_cudatoolkit_10 cuda-library-samples_cudatoolkit_10
cuda-library-samples_cudatoolkit_10_1 cuda-library-samples_cudatoolkit_10_1

View file

@ -38,7 +38,9 @@ in {
jdk-hotspot = callPackage package.jdk-hotspot {}; jdk-hotspot = callPackage package.jdk-hotspot {};
jre-hotspot = callPackage package.jre-hotspot {}; jre-hotspot = callPackage package.jre-hotspot {};
} // lib.optionalAttrs (package?jdk-openj9) {
jdk-openj9 = callPackage package.jdk-openj9 {}; jdk-openj9 = callPackage package.jdk-openj9 {};
} // lib.optionalAttrs (package?jre-openj9) {
jre-openj9 = callPackage package.jre-openj9 {}; jre-openj9 = callPackage package.jre-openj9 {};
}; };