about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/ocm
diff options
context:
space:
mode:
authorStephan <55607356+stehessel@users.noreply.github.com>2022-03-27 15:15:42 +0200
committerGitHub <noreply@github.com>2022-03-27 15:15:42 +0200
commit6250441d8ac0dddc33d216f27285211c1be856d8 (patch)
treedd3471e7bfee24b8fc18872902cfba8be83440a8 /pkgs/applications/networking/cluster/ocm
parent4bedc8d1c6be63467c07cba062e9c5370252ab47 (diff)
ocm: init at 0.1.62 (#165483)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/networking/cluster/ocm')
-rw-r--r--pkgs/applications/networking/cluster/ocm/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/ocm/default.nix b/pkgs/applications/networking/cluster/ocm/default.nix
new file mode 100644
index 0000000000000..1bacd8510dc40
--- /dev/null
+++ b/pkgs/applications/networking/cluster/ocm/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoModule, fetchFromGitHub, testVersion, ocm }:
+
+buildGoModule rec {
+  pname = "ocm";
+  version = "0.1.62";
+
+  src = fetchFromGitHub {
+    owner = "openshift-online";
+    repo = "ocm-cli";
+    rev = "v${version}";
+    sha256 = "0kv0zcx6wdlyid37ygzg05xyyk77ybd2qcdgbswjv6crcjh1xdrd";
+  };
+
+  vendorSha256 = "sha256-nXUrbF9mcHy8G7c+ktQixBmmf6x066gpuaZ0eUsJQwc=";
+
+  # Tests expect the binary to be located in the root directory.
+  preCheck = ''
+    ln -s $GOPATH/bin/ocm ocm
+  '';
+
+  passthru.tests.version = testVersion {
+    package = ocm;
+    command = "ocm version";
+  };
+
+  meta = with lib; {
+    description = "CLI for the Red Hat OpenShift Cluster Manager";
+    license = licenses.asl20;
+    homepage = "https://github.com/openshift-online/ocm-cli";
+    maintainers = with maintainers; [ stehessel ];
+  };
+}