2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv, lib, buildGoModule, fetchFromGitHub }:
|
2021-10-06 13:57:05 +00:00
|
|
|
|
|
|
|
let bins = [ "regbot" "regctl" "regsync" ]; in
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "regclient";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.4.4";
|
2021-10-06 13:57:05 +00:00
|
|
|
tag = "v${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "regclient";
|
|
|
|
repo = "regclient";
|
|
|
|
rev = tag;
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-jIdbSDUpSKlb6RES6hx+r+vZyny56aWyjAurCI3mywk=";
|
2021-10-06 13:57:05 +00:00
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
vendorSha256 = "sha256-QTeVgvjRw2wBd8QGoVpRVTTh+Wwu2NEZYR1Z9R52/p0=";
|
2021-10-06 13:57:05 +00:00
|
|
|
|
|
|
|
outputs = [ "out" ] ++ bins;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.VCSTag=${tag}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
lib.concatStringsSep "\n" (
|
|
|
|
map (bin: ''
|
|
|
|
mkdir -p ''$${bin}/bin &&
|
|
|
|
mv $out/bin/${bin} ''$${bin}/bin/ &&
|
|
|
|
ln -s ''$${bin}/bin/${bin} $out/bin/
|
|
|
|
'') bins
|
|
|
|
);
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-06 13:57:05 +00:00
|
|
|
description = "Docker and OCI Registry Client in Go and tooling using those libraries";
|
|
|
|
homepage = "https://github.com/regclient/regclient";
|
|
|
|
license = licenses.asl20;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-10-06 13:57:05 +00:00
|
|
|
};
|
|
|
|
}
|