runc: add phase hooks

This commit is contained in:
zowoq 2021-03-31 16:52:07 +10:00
parent 974ee55b16
commit 5490b3b224

View File

@ -35,17 +35,21 @@ buildGoPackage rec {
makeFlags = [ "BUILDTAGS+=seccomp" ];
buildPhase = ''
runHook preBuild
cd go/src/${goPackagePath}
patchShebangs .
make ${toString makeFlags} runc man
runHook postBuild
'';
installPhase = ''
runHook preInstall
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
runHook postInstall
'';
passthru.tests = { inherit (nixosTests) cri-o docker podman; };