From 974ee55b163c8ae193a192a18b60e209590f88cd Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 31 Mar 2021 16:52:07 +1000 Subject: [PATCH] podman: add phase hooks --- pkgs/applications/virtualization/podman/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 6282b730aae5..b64fc82f532e 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -48,14 +48,18 @@ buildGoModule rec { ]; buildPhase = '' + runHook preBuild patchShebangs . ${if stdenv.isDarwin then "make podman-remote" else "make podman"} make docs + runHook postBuild ''; - installPhase = lib.optionalString stdenv.isDarwin '' + installPhase = '' + runHook preInstall + '' + lib.optionalString stdenv.isDarwin '' mv bin/{podman-remote,podman} '' + '' install -Dm555 bin/podman $out/bin/podman @@ -66,6 +70,8 @@ buildGoModule rec { '' + lib.optionalString stdenv.isLinux '' install -Dm644 contrib/tmpfile/podman.conf -t $out/lib/tmpfiles.d install -Dm644 contrib/systemd/system/podman.{socket,service} -t $out/lib/systemd/system + '' + '' + runHook postInstall ''; passthru.tests = { inherit (nixosTests) podman; };