skopeo: install default policy to separate passthru package

This commit is contained in:
zowoq
2023-01-08 13:30:27 +10:00
parent 4a8663e6d2
commit 86d55aa667
+9 -2
View File
@@ -11,6 +11,7 @@
, makeWrapper
, fuse-overlayfs
, dockerTools
, runCommand
}:
buildGoModule rec {
@@ -46,6 +47,7 @@ buildGoModule rec {
runHook preInstall
PREFIX=$out make install-binary install-completions
PREFIX=$man make install-docs
install ${passthru.policy}/default-policy.json -Dt $out/etc/containers
'' + lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/skopeo \
--prefix PATH : ${lib.makeBinPath [ fuse-overlayfs ]}
@@ -53,8 +55,13 @@ buildGoModule rec {
runHook postInstall
'';
passthru.tests = {
inherit (dockerTools.examples) testNixFromDockerHub;
passthru = {
policy = runCommand "policy" { } ''
install ${src}/default-policy.json -Dt $out
'';
tests = {
inherit (dockerTools.examples) testNixFromDockerHub;
};
};
meta = with lib; {