Merge pull request #104545 from zowoq/runc

runc: add wrapper for systemd
This commit is contained in:
Florian Klink 2020-11-26 22:16:53 +01:00 committed by GitHub
commit 1cdbdc3278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,8 @@
, apparmor-parser
, libseccomp
, libselinux
, makeWrapper
, procps
, nixosTests
}:
@ -26,7 +28,7 @@ buildGoPackage rec {
goPackagePath = "github.com/opencontainers/runc";
outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ];
nativeBuildInputs = [ go-md2man installShellFiles makeWrapper pkg-config which ];
buildInputs = [ libselinux libseccomp libapparmor apparmor-parser ];
@ -43,6 +45,9 @@ buildGoPackage rec {
installPhase = ''
install -Dm755 runc $out/bin/runc
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; };