cudaPackages.cuda-samples: don't list package for unsupported CUDA version

This commit is contained in:
Connor Baker 2023-11-07 20:17:01 +00:00
parent 3441e3d32e
commit 30be50b080

View file

@ -11,15 +11,15 @@ final: prev: let
"11.4" = "082dkk5y34wyvjgj2p5j1d00rk8xaxb9z0mhvz16bd469r1bw2qk";
"11.5" = "sha256-AKRZbke0K59lakhTi8dX2cR2aBuWPZkiQxyKaZTvHrI=";
"11.6" = "sha256-AsLNmAplfuQbXg9zt09tXAuFJ524EtTYsQuUlV1tPkE=";
"11.7" = throw "The tag 11.7 of cuda-samples does not exist";
# The tag 11.7 of cuda-samples does not exist
"11.8" = "sha256-7+1P8+wqTKUGbCUBXGMDO9PkxYr2+PLDx9W2hXtXbuc=";
"12.0" = "sha256-Lj2kbdVFrJo5xPYPMiE4BS7Z8gpU5JLKXVJhZABUe/g=";
"12.1" = "sha256-xE0luOMq46zVsIEWwK4xjLs7NorcTIi9gbfZPVjIlqo=";
"12.2" = "sha256-pOy0qfDjA/Nr0T9PNKKefK/63gQnJV2MQsN2g3S2yng=";
}.${prev.cudaVersion};
};
in {
in prev.lib.attrsets.optionalAttrs (builtins.hasAttr prev.cudaVersion sha256) {
cuda-samples = final.callPackage ./generic.nix {
inherit sha256;
sha256 = sha256.${prev.cudaVersion};
};
}