3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/regclient/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1,012 B
Nix
Raw Normal View History

{ stdenv, lib, buildGoModule, fetchFromGitHub }:
2021-09-29 20:18:45 +01:00
let bins = [ "regbot" "regctl" "regsync" ]; in
buildGoModule rec {
pname = "regclient";
2022-03-06 16:12:30 +00:00
version = "0.4.0";
2021-09-29 20:18:45 +01:00
tag = "v${version}";
src = fetchFromGitHub {
owner = "regclient";
repo = "regclient";
rev = tag;
2022-03-06 16:12:30 +00:00
sha256 = "sha256-AaSl++/i00YAvmvaUSEwLLpItYACtmWEFTuUngl7rkI=";
2021-09-29 20:18:45 +01:00
};
2022-03-06 16:12:30 +00:00
vendorSha256 = "sha256-qpZ3RsBOkWqLCDK11vBGkAZJBC7T8hmpmm4ccGeWBus=";
2021-09-29 20:18:45 +01: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; {
broken = stdenv.isDarwin;
2021-09-29 20:18:45 +01:00
description = "Docker and OCI Registry Client in Go and tooling using those libraries";
homepage = "https://github.com/regclient/regclient";
license = licenses.asl20;
2021-11-03 00:38:27 +00:00
maintainers = with maintainers; [ ];
2021-09-29 20:18:45 +01:00
};
}