blob: f0cfb906b1fe0964039f9018fa38dfe4979d97cd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{ stdenv
, requireFile
, cudatoolkit
, fetchurl
}:
stdenv.mkDerivation rec {
version = "6.0";
cudatoolkit_version = "8.0";
name = "cudatoolkit-${cudatoolkit_version}-cudnn-${version}";
src = fetchurl {
url = "http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/cudnn-8.0-linux-x64-v6.0.tgz";
sha256 = "173zpgrk55ri8if7s5yngsc89ajd6hz4pss4cdxlv6lcyh5122cv";
};
installPhase = ''
function fixRunPath {
p=$(patchelf --print-rpath $1)
patchelf --set-rpath "$p:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}" $1
}
fixRunPath lib64/libcudnn.so
mkdir -p $out
cp -a include $out/include
cp -a lib64 $out/lib64
'';
propagatedBuildInputs = [
cudatoolkit
];
meta = with stdenv.lib; {
description = "NVIDIA CUDA Deep Neural Network library (cuDNN)";
homepage = https://developer.nvidia.com/cudnn;
license = stdenv.lib.licenses.unfree;
maintainers = with maintainers; [ jyp ];
};
}
|