2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-05-15 21:57:56 +00:00
|
|
|
, buildGoModule
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gpgme
|
|
|
|
, lvm2
|
|
|
|
, btrfs-progs
|
|
|
|
, pkg-config
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
2020-05-15 21:57:56 +00:00
|
|
|
, makeWrapper
|
|
|
|
, fuse-overlayfs
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "skopeo";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "containers";
|
|
|
|
repo = "skopeo";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-L3dHkF7yKnwXpXxCEswwA0TxVfjTzc89l0rpT7EYpIU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
outputs = [ "out" "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
vendorSha256 = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ gpgme ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
buildPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preBuild
|
2020-05-29 06:06:01 +00:00
|
|
|
patchShebangs .
|
2020-10-07 09:15:18 +00:00
|
|
|
make bin/skopeo docs
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
installPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preInstall
|
2020-10-07 09:15:18 +00:00
|
|
|
install -Dm755 bin/skopeo -t $out/bin
|
|
|
|
installManPage docs/*.[1-9]
|
2020-04-24 23:36:52 +00:00
|
|
|
installShellCompletion --bash completions/bash/skopeo
|
2021-01-15 22:18:51 +00:00
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
2020-05-15 21:57:56 +00:00
|
|
|
wrapProgram $out/bin/skopeo \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ fuse-overlayfs ]}
|
2021-04-05 15:23:46 +00:00
|
|
|
'' + ''
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A command line utility for various operations on container images and image repositories";
|
|
|
|
homepage = "https://github.com/containers/skopeo";
|
|
|
|
maintainers = with maintainers; [ lewo ] ++ teams.podman.members;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|