skopeo: cleanup
This commit is contained in:
parent
e14c4ba970
commit
6dc7443d1b
@ -1,5 +1,4 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
|
||||||
, buildGoPackage
|
, buildGoPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, runCommand
|
, runCommand
|
||||||
@ -12,8 +11,6 @@
|
|||||||
, go-md2man
|
, go-md2man
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.2.0";
|
version = "0.2.0";
|
||||||
|
|
||||||
@ -28,6 +25,8 @@ let
|
|||||||
|
|
||||||
goPackagePath = "github.com/containers/skopeo";
|
goPackagePath = "github.com/containers/skopeo";
|
||||||
|
|
||||||
|
vendorPath = "${goPackagePath}/vendor/github.com/containers/image/v5";
|
||||||
|
|
||||||
in
|
in
|
||||||
buildGoPackage {
|
buildGoPackage {
|
||||||
pname = "skopeo";
|
pname = "skopeo";
|
||||||
@ -36,20 +35,16 @@ buildGoPackage {
|
|||||||
|
|
||||||
outputs = [ "bin" "man" "out" ];
|
outputs = [ "bin" "man" "out" ];
|
||||||
|
|
||||||
excludedPackages = "integration";
|
excludedPackages = [ "integration" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config (lib.getBin go-md2man) ];
|
nativeBuildInputs = [ pkg-config go-md2man ];
|
||||||
buildInputs = [ gpgme ] ++ lib.optionals stdenv.isLinux [ libgpgerror lvm2 btrfs-progs libselinux ];
|
buildInputs = [ gpgme ]
|
||||||
|
++ stdenv.lib.optionals stdenv.isLinux [ libgpgerror lvm2 btrfs-progs libselinux ];
|
||||||
|
|
||||||
buildFlagsArray = ''
|
buildFlagsArray = ''
|
||||||
-ldflags=
|
-ldflags=
|
||||||
-X github.com/containers/skopeo/vendor/github.com/containers/image/v5/signature.systemDefaultPolicyPath=${defaultPolicyFile}
|
-X ${vendorPath}/signature.systemDefaultPolicyPath=${defaultPolicyFile}
|
||||||
-X github.com/containers/skopeo/vendor/github.com/containers/image/v5/internal/tmpdir.unixTempDirForBigFiles=/tmp
|
-X ${vendorPath}/internal/tmpdir.unixTempDirForBigFiles=/tmp
|
||||||
'';
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
export CGO_CFLAGS="$CFLAGS"
|
|
||||||
export CGO_LDFLAGS="$LDFLAGS"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user