forked from mirrors/nixpkgs
skopeo: don't set policy and tmpdir during build
This commit is contained in:
parent
32b8ed7380
commit
a5a411e67f
|
@ -12,7 +12,8 @@
|
||||||
, fuse-overlayfs
|
, fuse-overlayfs
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
buildGoModule rec {
|
||||||
|
pname = "skopeo";
|
||||||
version = "0.2.0";
|
version = "0.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -22,34 +23,22 @@ let
|
||||||
sha256 = "09zqzrw6f1s6kaknnj3hra3xz4nq6y86vmw5vk8p4f6g7cwakg1x";
|
sha256 = "09zqzrw6f1s6kaknnj3hra3xz4nq6y86vmw5vk8p4f6g7cwakg1x";
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPolicyFile = runCommand "skopeo-default-policy.json" {} "cp ${src}/default-policy.json $out";
|
|
||||||
|
|
||||||
vendorPath = "github.com/containers/skopeo/vendor/github.com/containers/image/v5";
|
|
||||||
|
|
||||||
in
|
|
||||||
buildGoModule {
|
|
||||||
pname = "skopeo";
|
|
||||||
inherit version;
|
|
||||||
inherit src;
|
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
||||||
excludedPackages = [ "integration" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ];
|
nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ];
|
||||||
|
|
||||||
buildInputs = [ gpgme ]
|
buildInputs = [ gpgme ]
|
||||||
++ stdenv.lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ];
|
++ stdenv.lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ];
|
||||||
|
|
||||||
buildFlagsArray = ''
|
buildPhase = ''
|
||||||
-ldflags=
|
patchShebangs .
|
||||||
-X ${vendorPath}/signature.systemDefaultPolicyPath=${defaultPolicyFile}
|
make binary-local
|
||||||
-X ${vendorPath}/internal/tmpdir.unixTempDirForBigFiles=/tmp
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postBuild = ''
|
installPhase = ''
|
||||||
|
make install-binary PREFIX=$out
|
||||||
make install-docs MANINSTALLDIR="$man/share/man"
|
make install-docs MANINSTALLDIR="$man/share/man"
|
||||||
installShellCompletion --bash completions/bash/skopeo
|
installShellCompletion --bash completions/bash/skopeo
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue