nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05-pre 41 lines 975 B view raw
1{ lib, buildGoModule, fetchFromGitHub }: 2 3let bins = [ "regbot" "regctl" "regsync" ]; in 4 5buildGoModule rec { 6 pname = "regclient"; 7 version = "0.3.8"; 8 tag = "v${version}"; 9 10 src = fetchFromGitHub { 11 owner = "regclient"; 12 repo = "regclient"; 13 rev = tag; 14 sha256 = "14w0g24sgphgib33sdvrvwk86p7km2pasb5fmr3p48i7sc71ja3h"; 15 }; 16 vendorSha256 = "sha256-9sRjP7lxMRdt9D9ElIX+mbYIvCaknWMgDyYl+1/q0/g="; 17 18 outputs = [ "out" ] ++ bins; 19 20 ldflags = [ 21 "-s" 22 "-w" 23 "-X main.VCSTag=${tag}" 24 ]; 25 26 postInstall = 27 lib.concatStringsSep "\n" ( 28 map (bin: '' 29 mkdir -p ''$${bin}/bin && 30 mv $out/bin/${bin} ''$${bin}/bin/ && 31 ln -s ''$${bin}/bin/${bin} $out/bin/ 32 '') bins 33 ); 34 35 meta = with lib; { 36 description = "Docker and OCI Registry Client in Go and tooling using those libraries"; 37 homepage = "https://github.com/regclient/regclient"; 38 license = licenses.asl20; 39 maintainers = with maintainers; [ ]; 40 }; 41}