podman: add phase hooks
This commit is contained in:
parent
e579194d15
commit
974ee55b16
@ -48,14 +48,18 @@ buildGoModule rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
${if stdenv.isDarwin
|
${if stdenv.isDarwin
|
||||||
then "make podman-remote"
|
then "make podman-remote"
|
||||||
else "make podman"}
|
else "make podman"}
|
||||||
make docs
|
make docs
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = lib.optionalString stdenv.isDarwin ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
mv bin/{podman-remote,podman}
|
mv bin/{podman-remote,podman}
|
||||||
'' + ''
|
'' + ''
|
||||||
install -Dm555 bin/podman $out/bin/podman
|
install -Dm555 bin/podman $out/bin/podman
|
||||||
@ -66,6 +70,8 @@ buildGoModule rec {
|
|||||||
'' + lib.optionalString stdenv.isLinux ''
|
'' + lib.optionalString stdenv.isLinux ''
|
||||||
install -Dm644 contrib/tmpfile/podman.conf -t $out/lib/tmpfiles.d
|
install -Dm644 contrib/tmpfile/podman.conf -t $out/lib/tmpfiles.d
|
||||||
install -Dm644 contrib/systemd/system/podman.{socket,service} -t $out/lib/systemd/system
|
install -Dm644 contrib/systemd/system/podman.{socket,service} -t $out/lib/systemd/system
|
||||||
|
'' + ''
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = { inherit (nixosTests) podman; };
|
passthru.tests = { inherit (nixosTests) podman; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user