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