From d51bd3664652d7614a42b1747cab4577a65b703c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bernardy Date: Thu, 24 Aug 2017 13:51:53 +0200 Subject: [PATCH] cudnn: add 6.0 --- .../science/math/cudnn/8.0-6.0/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/science/math/cudnn/8.0-6.0/default.nix diff --git a/pkgs/development/libraries/science/math/cudnn/8.0-6.0/default.nix b/pkgs/development/libraries/science/math/cudnn/8.0-6.0/default.nix new file mode 100644 index 000000000000..21efe5b59576 --- /dev/null +++ b/pkgs/development/libraries/science/math/cudnn/8.0-6.0/default.nix @@ -0,0 +1,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; [ jpbernardy ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f8f8793db1f..a1fecd1b0877 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1565,6 +1565,10 @@ with pkgs; cudatoolkit = cudatoolkit8; }; + cudnn60_cudatoolkit80 = callPackage ../development/libraries/science/math/cudnn/8.0-6.0 { + cudatoolkit = cudatoolkit8; + }; + curlFull = curl.override { idnSupport = true; ldapSupport = true;