summary refs log tree commit diff
path: root/pkgs/test/cuda/cuda-samples/generic.nix
diff options
context:
space:
mode:
authorSamuel Ainsworth <skainsworth@gmail.com>2021-09-21 07:03:01 +0000
committerSamuel Ainsworth <skainsworth@gmail.com>2021-09-21 07:03:01 +0000
commit0981d9473f646678a7279df30530c5ba51519ebe (patch)
tree140138e0c214cebe3dfc4c126963eb3d84766539 /pkgs/test/cuda/cuda-samples/generic.nix
parentc8cedcfa3e78e2b0b7d3bc86d4750ca2cace09f1 (diff)
downloadnixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar.gz
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar.bz2
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar.lz
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar.xz
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.tar.zst
nixpkgs-0981d9473f646678a7279df30530c5ba51519ebe.zip
cudatoolkit_11_{3,4}: init at 11.{3,4}.1
Diffstat (limited to 'pkgs/test/cuda/cuda-samples/generic.nix')
-rw-r--r--pkgs/test/cuda/cuda-samples/generic.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/test/cuda/cuda-samples/generic.nix b/pkgs/test/cuda/cuda-samples/generic.nix
index 2e3dcc8891f..c5a9e24abd4 100644
--- a/pkgs/test/cuda/cuda-samples/generic.nix
+++ b/pkgs/test/cuda/cuda-samples/generic.nix
@@ -1,6 +1,11 @@
-{ lib, stdenv, fetchFromGitHub
-, pkg-config, addOpenGLRunpath
-, sha256, cudatoolkit
+{ addOpenGLRunpath
+, cudatoolkit
+, fetchFromGitHub
+, fetchpatch
+, lib
+, pkg-config
+, sha256
+, stdenv
 }:
 
 let
@@ -22,6 +27,14 @@ stdenv.mkDerivation {
 
   buildInputs = [ cudatoolkit ];
 
+  # See https://github.com/NVIDIA/cuda-samples/issues/75.
+  patches = lib.optionals (version == "11.3") [
+    (fetchpatch {
+      url = "https://github.com/NVIDIA/cuda-samples/commit/5c3ec60faeb7a3c4ad9372c99114d7bb922fda8d.patch";
+      sha256 = "sha256:15bydf59scmfnldz5yawbjacdxafi50ahgpzq93zlc5xsac5sz6i";
+    })
+  ];
+
   enableParallelBuilding = true;
 
   preConfigure = ''