mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
43 lines
1012 B
Nix
43 lines
1012 B
Nix
{ stdenv, lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
let bins = [ "regbot" "regctl" "regsync" ]; in
|
|
|
|
buildGoModule rec {
|
|
pname = "regclient";
|
|
version = "0.4.4";
|
|
tag = "v${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "regclient";
|
|
repo = "regclient";
|
|
rev = tag;
|
|
sha256 = "sha256-jIdbSDUpSKlb6RES6hx+r+vZyny56aWyjAurCI3mywk=";
|
|
};
|
|
vendorSha256 = "sha256-QTeVgvjRw2wBd8QGoVpRVTTh+Wwu2NEZYR1Z9R52/p0=";
|
|
|
|
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;
|
|
description = "Docker and OCI Registry Client in Go and tooling using those libraries";
|
|
homepage = "https://github.com/regclient/regclient";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|