nixpkgs/pkgs/applications/virtualization/nvidia-docker/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
764 B
Nix
Raw Normal View History

2021-01-09 14:49:46 +00:00
{ stdenv, lib, fetchFromGitHub, callPackage }:
2021-01-06 14:10:01 +00:00
stdenv.mkDerivation rec {
pname = "nvidia-docker";
2021-01-06 14:10:01 +00:00
version = "2.5.0";
src = fetchFromGitHub {
owner = "NVIDIA";
repo = pname;
rev = "v${version}";
2021-01-06 14:10:01 +00:00
sha256 = "1n1k7fnimky67s12p2ycaq9mgk245fchq62vgd7bl3bzfcbg0z4h";
};
buildPhase = ''
mkdir bin
cp nvidia-docker bin
substituteInPlace bin/nvidia-docker --subst-var-by VERSION ${version}
'';
installPhase = ''
mkdir -p $out/bin
cp bin/nvidia-docker $out/bin
'';
2021-01-09 15:17:26 +00:00
meta = with lib; {
homepage = "https://github.com/NVIDIA/nvidia-docker";
description = "NVIDIA container runtime for Docker";
license = licenses.bsd3;
platforms = platforms.linux;
2021-01-09 15:17:26 +00:00
maintainers = with maintainers; [ cpcloud ];
};
}