about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/go-containerregistry
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-10-19 14:40:23 +0000
committerAlyssa Ross <hi@alyssa.is>2022-01-07 10:22:32 +0000
commitcc62bcb55359ba8c5e0fe3a48e778444c89060d8 (patch)
treeca0e21d44eaf8837b687395e614445f7761d7bbd /nixpkgs/pkgs/development/tools/go-containerregistry
parentd6625e8d25efd829c3cfa227d025ca4e606ae4b7 (diff)
parenta323570a264da96a0b0bcc1c9aa017794acdc752 (diff)
downloadnixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.gz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.bz2
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.lz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.xz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.zst
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.zip
Merge commit 'a323570a264da96a0b0bcc1c9aa017794acdc752'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/go-containerregistry')
-rw-r--r--nixpkgs/pkgs/development/tools/go-containerregistry/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/tools/go-containerregistry/default.nix b/nixpkgs/pkgs/development/tools/go-containerregistry/default.nix
index 0fcbda696619..afd91a03f8a1 100644
--- a/nixpkgs/pkgs/development/tools/go-containerregistry/default.nix
+++ b/nixpkgs/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 ];
   };
 }