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