nixpkgs/pkgs/applications/virtualization/gvisor/default.nix

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

44 lines
1011 B
Nix
Raw Normal View History

{ lib
, buildGoModule
2019-10-27 03:18:26 +00:00
, fetchFromGitHub
2021-03-14 16:05:16 +00:00
, iproute2
2019-10-27 03:18:26 +00:00
, iptables
, makeWrapper
, procps
}:
buildGoModule rec {
2022-03-07 11:37:20 +00:00
pname = "gvisor";
version = "20220905.0";
2019-10-27 03:18:26 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "gvisor";
rev = "442a3cd44a0858ac2a8e773b6fbba67cf3bd3767";
sha256 = "sha256-LKY7AKAHX29eGuXRrkCVCFl/bdHAVOC0QNZfzlpXqwc=";
2019-10-27 03:18:26 +00:00
};
vendorSha256 = "sha256-Fn8A8iwTv0lNI9ZBJkq3SlRelnAGIQY0GInTxaCzSAU=";
2019-10-27 03:18:26 +00:00
nativeBuildInputs = [ makeWrapper ];
2019-10-27 03:18:26 +00:00
ldflags = [ "-s" "-w" ];
2019-10-27 03:18:26 +00:00
subPackages = [ "runsc" "shim" ];
2019-10-27 03:18:26 +00:00
postInstall = ''
# Needed for the 'runsc do' subcomand
wrapProgram $out/bin/runsc \
--prefix PATH : ${lib.makeBinPath [ iproute2 iptables procps ]}
mv $out/bin/shim $out/bin/containerd-shim-runsc-v1
'';
2019-10-27 03:18:26 +00:00
meta = with lib; {
description = "Application Kernel for Containers";
homepage = "https://github.com/google/gvisor";
2019-10-27 03:18:26 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ andrew-d gpl ];
2019-10-27 03:18:26 +00:00
platforms = [ "x86_64-linux" ];
};
}