From 016004a37bb784a418a57ac8cc9cd358340630d2 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Tue, 23 Sep 2025 17:24:24 +0000 Subject: [PATCH] cudaPackages.cudnn_samples: init Signed-off-by: Connor Baker --- .../cuda-modules/packages/cudnn_samples.nix | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/development/cuda-modules/packages/cudnn_samples.nix diff --git a/pkgs/development/cuda-modules/packages/cudnn_samples.nix b/pkgs/development/cuda-modules/packages/cudnn_samples.nix new file mode 100644 index 000000000000..ff4e743c0eb6 --- /dev/null +++ b/pkgs/development/cuda-modules/packages/cudnn_samples.nix @@ -0,0 +1,36 @@ +{ + buildRedist, + cmake, + cuda_cudart, + cuda_nvcc, + cudnn, + lib, +}: +buildRedist (finalAttrs: { + redistName = "cudnn"; + pname = "cudnn_samples"; + + outputs = [ "out" ]; + + allowFHSReferences = true; + + # Sources are nested in a directory with the same name as the package + setSourceRoot = "sourceRoot=$(echo */src/cudnn_samples_v${lib.versions.major finalAttrs.version}/)"; + + nativeBuildInputs = [ + cmake + cuda_nvcc + ]; + + buildInputs = [ + cuda_cudart + cudnn + ]; + + brokenAssertions = [ + { + message = "FreeImage is required as a subdirectory and @connorbaker has not yet patched the build to find it"; + assertion = false; + } + ]; +})