diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-09-29 14:51:13 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-09-29 21:03:22 -0300 |
commit | 31f0e8fb2eed323ad2027d27f2c6ffad448a633c (patch) | |
tree | cecbd0acdee5aef5528cdac1977ddb026455cb06 /pkgs/development/tools/go-containerregistry | |
parent | a5b3afece376f255309bf959f6651e91a1c6e1b4 (diff) | |
download | nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar.gz nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar.bz2 nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar.lz nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar.xz nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.tar.zst nixpkgs-31f0e8fb2eed323ad2027d27f2c6ffad448a633c.zip |
go-containerregistry: 0.4.1 -> 0.6.0
* Unbundled crane & gcrane. * Add superherointj as maintainer.
Diffstat (limited to 'pkgs/development/tools/go-containerregistry')
-rw-r--r-- | pkgs/development/tools/go-containerregistry/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/development/tools/go-containerregistry/default.nix b/pkgs/development/tools/go-containerregistry/default.nix index 0fcbda69661..afd91a03f8a 100644 --- a/pkgs/development/tools/go-containerregistry/default.nix +++ b/pkgs/development/tools/go-containerregistry/default.nix @@ -1,23 +1,36 @@ { lib, buildGoModule, fetchFromGitHub }: +let bins = [ "crane" "gcrane" ]; in + buildGoModule rec { pname = "go-containerregistry"; - version = "0.4.1"; + version = "0.6.0"; src = fetchFromGitHub { owner = "google"; repo = pname; rev = "v${version}"; - hash = "sha256-3mvGHAPKDUmrQkBKwlxnF6PG0ZpZDqlM9SMkCyC5ytE="; + sha256 = "0sk3g1i4w8sh40y1ffa61ap7jsscdvnhvh09k8nznydi465csbmq"; }; vendorSha256 = null; subPackages = [ "cmd/crane" "cmd/gcrane" ]; + outputs = [ "out" ] ++ bins; + ldflags = let t = "github.com/google/go-containerregistry"; in [ "-s" "-w" "-X ${t}/cmd/crane/cmd.Version=v${version}" "-X ${t}/pkg/v1/remote/transport.Version=${version}" ]; + postInstall = + lib.concatStringsSep "\n" ( + map (bin: '' + mkdir -p ''$${bin}/bin && + mv $out/bin/${bin} ''$${bin}/bin/ && + ln -s ''$${bin}/bin/${bin} $out/bin/ + '') bins + ); + # NOTE: no tests doCheck = false; @@ -25,6 +38,6 @@ buildGoModule rec { description = "Tools for interacting with remote images and registries including crane and gcrane"; homepage = "https://github.com/google/go-containerregistry"; license = licenses.apsl20; - maintainers = with maintainers; [ yurrriq ]; + maintainers = with maintainers; [ superherointj yurrriq ]; }; } |