{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "cudnn-8.0";
src = /root/cudnn-8.0-linux-x64-v5.1.tgz;
#unpackPhase patchPhase configurePhase buildPhase checkPhase installPhase
#fixupPhase distPhase
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
unpackCmd = ''
tar -xzvf $src;
stripHash $curSrc;
mkdir trash
cp -prd --no-preserve=timestamps $curSrc trash/$strippedName;
'';
installPhase = ''
mkdir -p $out/bin
chmod +x ../trash/$strippedName
cp -r ../trash/include $out/include
cp -r ../trash/lib64 $out/lib64
'';
#dontStrip = true;
#dontPatchELF = true;
#dontPatchShebangs = true;
}