2022-04-15 01:41:22 +00:00
|
|
|
final: prev: let
|
|
|
|
|
|
|
|
inherit (final) callPackage;
|
2023-05-24 13:37:59 +00:00
|
|
|
inherit (prev) cudaVersion lib;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
### Cuda Toolkit Redist
|
|
|
|
|
|
|
|
# Manifest files for redist cudatoolkit. These can be found at
|
|
|
|
# https://developer.download.nvidia.com/compute/cuda/redist/
|
|
|
|
cudaToolkitRedistManifests = {
|
|
|
|
"11.4" = ./manifests/redistrib_11.4.4.json;
|
|
|
|
"11.5" = ./manifests/redistrib_11.5.2.json;
|
|
|
|
"11.6" = ./manifests/redistrib_11.6.2.json;
|
2022-10-06 18:32:54 +00:00
|
|
|
"11.7" = ./manifests/redistrib_11.7.0.json;
|
2022-11-21 17:40:18 +00:00
|
|
|
"11.8" = ./manifests/redistrib_11.8.0.json;
|
2023-03-04 12:14:45 +00:00
|
|
|
"12.0" = ./manifests/redistrib_12.0.1.json;
|
2023-05-24 13:37:59 +00:00
|
|
|
"12.1" = ./manifests/redistrib_12.1.1.json;
|
2023-07-15 17:15:38 +00:00
|
|
|
"12.2" = ./manifests/redistrib_12.2.0.json;
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Function to build a single cudatoolkit redist package
|
|
|
|
buildCudaToolkitRedistPackage = callPackage ./build-cuda-redist-package.nix { };
|
|
|
|
|
|
|
|
# Function that builds all cudatoolkit redist packages given a cuda version and manifest file
|
|
|
|
buildCudaToolkitRedistPackages = { version, manifest }: let
|
|
|
|
attrs = lib.filterAttrs (key: value: key != "release_date") (lib.importJSON manifest);
|
|
|
|
in lib.mapAttrs buildCudaToolkitRedistPackage attrs;
|
|
|
|
|
|
|
|
# All cudatoolkit redist packages for the current cuda version
|
2023-07-15 17:15:38 +00:00
|
|
|
cudaToolkitRedistPackages = lib.optionalAttrs (lib.hasAttr cudaVersion cudaToolkitRedistManifests)
|
|
|
|
(buildCudaToolkitRedistPackages { version = cudaVersion; manifest = cudaToolkitRedistManifests.${cudaVersion}; });
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
in cudaToolkitRedistPackages
|