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,9 +55,14 @@ buildGoModule rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
passthru = {
|
||||
policy = runCommand "policy" { } ''
|
||||
install ${src}/default-policy.json -Dt $out
|
||||
'';
|
||||
tests = {
|
||||
inherit (dockerTools.examples) testNixFromDockerHub;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command line utility for various operations on container images and image repositories";
|
||||
|
Loading…
Reference in New Issue
Block a user