skopeo: install default policy to separate passthru package
This commit is contained in:
parent
4a8663e6d2
commit
86d55aa667
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user