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

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

50 lines
1.2 KiB
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";
2022-11-07 05:25:55 +00:00
version = "20221102.1";
2022-09-21 15:47:20 +00:00
# gvisor provides a synthetic go branch (https://github.com/google/gvisor/tree/go)
# that can be used to build gvisor without bazel.
# For updates, you should stick to the commits labeled "Merge release-** (automated)"
2019-10-27 03:18:26 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "gvisor";
2022-11-07 05:25:55 +00:00
rev = "bf8eeee3a9eb966bc72c773da060a3c8bb73b8ff";
sha256 = "sha256-rADQsJ+AnBVlfQURGJl1xR6Ad5NyRWSrBSpOFMRld+o=";
2019-10-27 03:18:26 +00:00
};
2022-09-21 15:47:20 +00:00
vendorSha256 = "sha256-iGLWxx/Kn1QaJTNOZcc+mwoF3ecEDOkaqmA0DH4pdgU=";
2019-10-27 03:18:26 +00:00
nativeBuildInputs = [ makeWrapper ];
2019-10-27 03:18:26 +00:00
2022-09-21 15:47:20 +00:00
CGO_ENABLED = 0;
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" ];
};
}