3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/virtualization/nvidia-docker/default.nix

33 lines
758 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
'';
meta = {
homepage = "https://github.com/NVIDIA/nvidia-docker";
description = "NVIDIA container runtime for Docker";
license = licenses.bsd3;
platforms = platforms.linux;
2021-01-06 14:10:01 +00:00
maintainers = with lib.maintainers; [ cpcloud ];
};
}