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

38 lines
996 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildGoModule
, makeWrapper
, nvidia-container-runtime
}:
buildGoModule rec {
pname = "nvidia-container-toolkit";
version = "1.3.0";
2021-01-10 12:58:41 +00:00
src = fetchFromGitHub {
owner = "NVIDIA";
repo = pname;
rev = "v${version}";
sha256 = "04284bhgx4j55vg9ifvbji2bvmfjfy3h1lq7q356ffgw3yr9n0hn";
};
2021-01-10 12:58:41 +00:00
vendorSha256 = "17zpiyvf22skfcisflsp6pn56y6a793jcx89kw976fq2x5br1bz7";
2021-08-26 07:45:51 +01:00
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ makeWrapper ];
2021-01-10 12:58:41 +00:00
postInstall = ''
mv $out/bin/{pkg,${pname}}
ln -s $out/bin/nvidia-container-{toolkit,runtime-hook}
wrapProgram $out/bin/nvidia-container-toolkit \
--add-flags "-config ${nvidia-container-runtime}/etc/nvidia-container-runtime/config.toml"
'';
meta = with lib; {
homepage = "https://github.com/NVIDIA/nvidia-container-toolkit";
description = "NVIDIA container runtime hook";
2021-01-10 13:53:07 +00:00
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ cpcloud ];
};
}