Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active January 21, 2017 04:20
Show Gist options
  • Save cleverca22/ed3dc79e5f427343cf57ac5b035ba036 to your computer and use it in GitHub Desktop.
Save cleverca22/ed3dc79e5f427343cf57ac5b035ba036 to your computer and use it in GitHub Desktop.
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ cudnn ];
nixpkgs.config.packageOverrides = pkgs: rec {
cudnn = pkgs.callPackage ./install-cudnn.nix {};
};
}
{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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment