runc: add wrapper for procps, systemd

for cgroupsv2 it needs `busctl` and `systemctl` in its PATH.
This commit is contained in:
zowoq 2020-11-22 10:37:18 +10:00
parent a82d8ca64d
commit 50e24b8e0a

View file

@ -9,6 +9,8 @@
, apparmor-parser , apparmor-parser
, libseccomp , libseccomp
, libselinux , libselinux
, makeWrapper
, procps
, nixosTests , nixosTests
}: }:
@ -26,7 +28,7 @@ buildGoPackage rec {
goPackagePath = "github.com/opencontainers/runc"; goPackagePath = "github.com/opencontainers/runc";
outputs = [ "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ]; nativeBuildInputs = [ go-md2man installShellFiles makeWrapper pkg-config which ];
buildInputs = [ libselinux libseccomp libapparmor apparmor-parser ]; buildInputs = [ libselinux libseccomp libapparmor apparmor-parser ];
@ -43,6 +45,9 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
install -Dm755 runc $out/bin/runc install -Dm755 runc $out/bin/runc
installManPage man/*/*.[1-9] installManPage man/*/*.[1-9]
wrapProgram $out/bin/runc \
--prefix PATH : ${lib.makeBinPath [ procps ]} \
--prefix PATH : /run/current-system/systemd/bin
''; '';
passthru.tests = { inherit (nixosTests) cri-o docker podman; }; passthru.tests = { inherit (nixosTests) cri-o docker podman; };