diff --git a/pkgs/development/cuda-modules/cuda/overrides.nix b/pkgs/development/cuda-modules/cuda/overrides.nix index afe37accd7a11..0e3faf74fe6ac 100644 --- a/pkgs/development/cuda-modules/cuda/overrides.nix +++ b/pkgs/development/cuda-modules/cuda/overrides.nix @@ -355,17 +355,19 @@ filterAndCreateOverrides { ]; brokenConditions = prevAttrs.brokenConditions // { - # Older releases require boost 1.70, which is deprecated in Nixpkgs - "CUDA too old (<11.8)" = cudaOlder "11.8"; "Qt 5 missing (<2022.4.2.1)" = !(versionOlder version "2022.4.2.1" -> qt5 != null); "Qt 6 missing (>=2022.4.2.1)" = !(versionAtLeast version "2022.4.2.1" -> qt6 != null); }; + badPlatformsConditions = prevAttrs.badPlatformsConditions // { + # Older releases require boost 1.70, which is deprecated in Nixpkgs + "CUDA too old (<11.8)" = cudaOlder "11.8"; + }; }; nvidia_driver = { }: prevAttrs: { - brokenConditions = prevAttrs.brokenConditions // { + badPlatformsConditions = prevAttrs.badPlatformsConditions // { "Package is not supported; use drivers from linuxPackages" = true; }; }; diff --git a/pkgs/development/cuda-modules/cudnn/fixup.nix b/pkgs/development/cuda-modules/cudnn/fixup.nix index 183f38cfd4cf3..7262f5baf6226 100644 --- a/pkgs/development/cuda-modules/cudnn/fixup.nix +++ b/pkgs/development/cuda-modules/cudnn/fixup.nix @@ -20,13 +20,13 @@ finalAttrs: prevAttrs: { src = fetchurl { inherit (package) url hash; }; # Useful for inspecting why something went wrong. - brokenConditions = + badPlatformsConditions = let cudaTooOld = strings.versionOlder cudaVersion package.minCudaVersion; cudaTooNew = (package.maxCudaVersion != null) && strings.versionOlder package.maxCudaVersion cudaVersion; in - prevAttrs.brokenConditions + prevAttrs.badPlatformsConditions // { "CUDA version is too old" = cudaTooOld; "CUDA version is too new" = cudaTooNew; diff --git a/pkgs/development/cuda-modules/tensorrt/fixup.nix b/pkgs/development/cuda-modules/tensorrt/fixup.nix index aab6d8f320796..ed249141c83e5 100644 --- a/pkgs/development/cuda-modules/tensorrt/fixup.nix +++ b/pkgs/development/cuda-modules/tensorrt/fixup.nix @@ -109,5 +109,10 @@ finalAttrs: prevAttrs: { ++ lib.optionals (targetArch == "unsupported") [ hostPlatform.system ]; homepage = "https://developer.nvidia.com/tensorrt"; maintainers = prevAttrs.meta.maintainers ++ [ maintainers.aidalgol ]; + + # Building TensorRT on Hydra is impossible because of the non-redistributable + # license and because the source needs to be manually downloaded from the + # NVIDIA Developer Program (see requireFile above). + hydraPlatforms = lib.platforms.none; }; } diff --git a/pkgs/top-level/release-cuda.nix b/pkgs/top-level/release-cuda.nix index a7f4d481b0135..55796a21291d8 100644 --- a/pkgs/top-level/release-cuda.nix +++ b/pkgs/top-level/release-cuda.nix @@ -42,6 +42,9 @@ in inherit allowUnfreePredicate; "${variant}Support" = true; inHydra = true; + + # Don't evaluate duplicate and/or deprecated attributes + allowAliases = false; }; __allowFileset = false; @@ -69,11 +72,16 @@ let ; # Package sets to evaluate whole - packageSets = builtins.filter (lib.strings.hasPrefix "cudaPackages") (builtins.attrNames pkgs); - evalPackageSet = pset: mapTestOn { ${pset} = packagePlatforms pkgs.${pset}; }; + # Derivations from these package sets are selected based on the value + # of their meta.{hydraPlatforms,platforms,badPlatforms} attributes + autoPackageSets = builtins.filter (lib.strings.hasPrefix "cudaPackages") (builtins.attrNames pkgs); + autoPackagePlatforms = lib.genAttrs autoPackageSets (pset: packagePlatforms pkgs.${pset}); - jobs = - mapTestOn { + # Explicitly select additional packages to also evaluate + # The desired platforms must be set explicitly here + explicitPackagePlatforms = + # This comment prevents nixfmt from changing the indentation level, lol + { blas = linux; blender = linux; faiss = linux; @@ -126,7 +134,7 @@ let grad-cam = linux; jaxlib = linux; jax = linux; - Keras = linux; + keras = linux; kornia = linux; mmcv = linux; mxnet = linux; @@ -140,15 +148,13 @@ let pymc = linux; pyrealsense2WithCuda = linux; pytorch-lightning = linux; - pytorch = linux; - scikitimage = linux; + scikit-image = linux; scikit-learn = linux; # Only affected by MKL? scipy = linux; # Only affected by MKL? spacy-transformers = linux; tensorflow = linux; tensorflow-probability = linux; tesserocr = linux; - Theano = linux; tiny-cuda-nn = linux; torchaudio = linux; torch = linux; @@ -158,7 +164,11 @@ let vidstab = linux; vllm = linux; }; - } - // (lib.genAttrs packageSets evalPackageSet); + }; + + # Explicitly specified platforms take precedence over the platforms + # automatically inferred in autoPackagePlatforms + allPackagePlatforms = lib.recursiveUpdate autoPackagePlatforms explicitPackagePlatforms; + jobs = mapTestOn allPackagePlatforms; in jobs