mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-24 06:08:16 +03:00
Merge pull request #85414 from zowoq/skopeo
This commit is contained in:
commit
d96959a629
@ -1,5 +1,4 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
|
||||||
, buildGoPackage
|
, buildGoPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, runCommand
|
, runCommand
|
||||||
@ -10,10 +9,9 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, libselinux
|
, libselinux
|
||||||
, go-md2man
|
, go-md2man
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.2.0";
|
version = "0.2.0";
|
||||||
|
|
||||||
@ -28,6 +26,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,26 +36,23 @@ 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 installShellFiles ];
|
||||||
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 = ''
|
||||||
# depends on buildGoPackage not changing …
|
# depends on buildGoPackage not changing …
|
||||||
pushd ./go/src/${goPackagePath}
|
pushd ./go/src/${goPackagePath}
|
||||||
make install-docs MANINSTALLDIR="$man/share/man"
|
make install-docs MANINSTALLDIR="$man/share/man"
|
||||||
|
installShellCompletion --bash completions/bash/skopeo
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user