diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-09-29 16:18:45 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-09-29 20:54:07 -0300 |
commit | d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0 (patch) | |
tree | 4a1b8186f51f0ce320389780ff7b58d3e0b54708 /pkgs/development/tools/regclient/default.nix | |
parent | d32b07e6df276d78e3640eb43882b80c9b2b3459 (diff) | |
download | nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar.gz nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar.bz2 nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar.lz nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar.xz nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.tar.zst nixpkgs-d7ae51d4f6dc6c8ee9495f79b8c5b4112d9876c0.zip |
regclient: init 0.3.8
Diffstat (limited to 'pkgs/development/tools/regclient/default.nix')
-rw-r--r-- | pkgs/development/tools/regclient/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/tools/regclient/default.nix b/pkgs/development/tools/regclient/default.nix new file mode 100644 index 00000000000..8df0a3abfdf --- /dev/null +++ b/pkgs/development/tools/regclient/default.nix @@ -0,0 +1,41 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +let bins = [ "regbot" "regctl" "regsync" ]; in + +buildGoModule rec { + pname = "regclient"; + version = "0.3.8"; + tag = "v${version}"; + + src = fetchFromGitHub { + owner = "regclient"; + repo = "regclient"; + rev = tag; + sha256 = "14w0g24sgphgib33sdvrvwk86p7km2pasb5fmr3p48i7sc71ja3h"; + }; + vendorSha256 = "sha256-9sRjP7lxMRdt9D9ElIX+mbYIvCaknWMgDyYl+1/q0/g="; + + 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; { + 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; [ superherointj ]; + }; +} |