summary refs log tree commit diff
path: root/pkgs/development/tools/go-containerregistry
diff options
context:
space:
mode:
authorEric Bailey <yurrriq@users.noreply.github.com>2021-04-06 03:00:40 -0500
committerGitHub <noreply@github.com>2021-04-06 10:00:40 +0200
commit341f79578759f7ce9e30626672ed6c85b307193e (patch)
tree0c8089d28b181381f80ba31215e226f7caecccf4 /pkgs/development/tools/go-containerregistry
parent536080e34bf61d8d5643012add7ac67bb89d0652 (diff)
downloadnixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar.gz
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar.bz2
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar.lz
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar.xz
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.tar.zst
nixpkgs-341f79578759f7ce9e30626672ed6c85b307193e.zip
go-containerregistry: init at 0.4.1 (#115875)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/tools/go-containerregistry')
-rw-r--r--pkgs/development/tools/go-containerregistry/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/tools/go-containerregistry/default.nix b/pkgs/development/tools/go-containerregistry/default.nix
new file mode 100644
index 00000000000..52b233817ab
--- /dev/null
+++ b/pkgs/development/tools/go-containerregistry/default.nix
@@ -0,0 +1,31 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "go-containerregistry";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-3mvGHAPKDUmrQkBKwlxnF6PG0ZpZDqlM9SMkCyC5ytE=";
+  };
+
+  vendorSha256 = null;
+
+  subPackages = [ "cmd/crane" "cmd/gcrane" ];
+
+  buildFlagsArray = [
+    "-ldflags=-s -w -X github.com/google/go-containerregistry/cmd/crane/cmd.Version=${version} -X github.com/google/go-containerregistry/pkg/v1/remote/transport.Version=${version}"
+  ];
+
+  # NOTE: no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A tool for interacting with remote images and registries";
+    homepage = "https://github.com/google/go-containerregistry";
+    license = licenses.apsl20;
+    maintainers = with maintainers; [ yurrriq ];
+  };
+}