skopeo: add phase hooks

This commit is contained in:
zowoq 2021-03-31 16:52:08 +10:00
parent 0745b524b2
commit eea81a5e5b

View file

@ -35,17 +35,22 @@ buildGoModule rec {
++ lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ];
buildPhase = ''
runHook preBuild
patchShebangs .
make bin/skopeo docs
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 bin/skopeo -t $out/bin
installManPage docs/*.[1-9]
installShellCompletion --bash completions/bash/skopeo
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/skopeo \
--prefix PATH : ${lib.makeBinPath [ fuse-overlayfs ]}
'' + ''
runHook postInstall
'';
meta = with lib; {