14 version = "20240401.0";
16 # gvisor provides a synthetic go branch (https://github.com/google/gvisor/tree/go)
17 # that can be used to build gvisor without bazel.
18 # For updates, you should stick to the commits labeled "Merge release-** (automated)"
20 src = fetchFromGitHub {
23 rev = "9d995324d058812a5476f8c06b20167012511e9c";
24 hash = "sha256-idgUEbYAfnm/HphVs12Sj1FwG+jmL2BBr0PJnG9BC3A=";
27 # Replace the placeholder with the actual path to ldconfig
29 substituteInPlace runsc/container/container.go \
30 --replace-fail '"/sbin/ldconfig"' '"${glibc}/bin/ldconfig"'
33 vendorHash = "sha256-jbMXeNXzvjfJcIfHjvf8I3ePjm6KFTXJ94ia4T2hUs4=";
35 nativeBuildInputs = [ makeWrapper ];
39 ldflags = [ "-s" "-w" ];
41 subPackages = [ "runsc" "shim" ];
44 # Needed for the 'runsc do' subcommand
45 wrapProgram $out/bin/runsc \
46 --prefix PATH : ${lib.makeBinPath [ iproute2 iptables procps ]}
47 mv $out/bin/shim $out/bin/containerd-shim-runsc-v1
50 passthru.tests = { inherit (nixosTests) gvisor; };
53 description = "Application Kernel for Containers";
54 homepage = "https://github.com/google/gvisor";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ gpl ];
57 platforms = [ "x86_64-linux" "aarch64-linux" ];