aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/skopeo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/skopeo/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/skopeo/default.nix32
1 files changed, 12 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/tools/skopeo/default.nix b/nixpkgs/pkgs/development/tools/skopeo/default.nix
index 5532c3088e0..45b6867197e 100644
--- a/nixpkgs/pkgs/development/tools/skopeo/default.nix
+++ b/nixpkgs/pkgs/development/tools/skopeo/default.nix
@@ -10,46 +10,36 @@
, installShellFiles
, makeWrapper
, fuse-overlayfs
+, nixosTests
}:
-let
- version = "0.2.0";
+buildGoModule rec {
+ pname = "skopeo";
+ version = "1.0.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "containers";
repo = "skopeo";
- sha256 = "09zqzrw6f1s6kaknnj3hra3xz4nq6y86vmw5vk8p4f6g7cwakg1x";
+ sha256 = "1zg0agf8x7fa8zdzfzgncm64j363lmxrqjhdzsx6mlig87k17p05";
};
- 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
'';
@@ -59,6 +49,8 @@ buildGoModule {
--prefix PATH : ${stdenv.lib.makeBinPath [ fuse-overlayfs ]}
'';
+ passthru.tests.docker-tools = nixosTests.docker-tools;
+
meta = with stdenv.lib; {
description = "A command line utility for various operations on container images and image repositories";
homepage = "https://github.com/containers/skopeo";