3
0
Fork 0
forked from mirrors/nixpkgs

skopeo: don't set policy and tmpdir during build

This commit is contained in:
zowoq 2020-05-14 22:37:34 +10:00
parent 32b8ed7380
commit a5a411e67f

View file

@ -12,7 +12,8 @@
, fuse-overlayfs
}:
let
buildGoModule rec {
pname = "skopeo";
version = "0.2.0";
src = fetchFromGitHub {
@ -22,34 +23,22 @@ let
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" ];
vendorSha256 = null;
excludedPackages = [ "integration" ];
nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ];
buildInputs = [ gpgme ]
++ stdenv.lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ];
buildFlagsArray = ''
-ldflags=
-X ${vendorPath}/signature.systemDefaultPolicyPath=${defaultPolicyFile}
-X ${vendorPath}/internal/tmpdir.unixTempDirForBigFiles=/tmp
buildPhase = ''
patchShebangs .
make binary-local
'';
postBuild = ''
installPhase = ''
make install-binary PREFIX=$out
make install-docs MANINSTALLDIR="$man/share/man"
installShellCompletion --bash completions/bash/skopeo
'';