about summary refs log tree commit diff
path: root/pkgs/by-name/ro/rosa/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ro/rosa/package.nix')
-rw-r--r--pkgs/by-name/ro/rosa/package.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/ro/rosa/package.nix b/pkgs/by-name/ro/rosa/package.nix
new file mode 100644
index 0000000000000..61fa1ed839502
--- /dev/null
+++ b/pkgs/by-name/ro/rosa/package.nix
@@ -0,0 +1,38 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, rosa }:
+
+buildGoModule rec {
+  pname = "rosa";
+  version = "1.2.36";
+
+  src = fetchFromGitHub {
+    owner = "openshift";
+    repo = "rosa";
+    rev = "v${version}";
+    hash = "sha256-jdLMQLbk446QJ+8+HjTCTjtlCuLlZZsLUBInRg4UMH0=";
+  };
+  vendorHash = null;
+
+  ldflags = [ "-s" "-w" ];
+
+  __darwinAllowLocalNetworking = true;
+
+  nativeBuildInputs = [ installShellFiles ];
+  postInstall = ''
+    installShellCompletion --cmd rosa \
+      --bash <($out/bin/rosa completion bash) \
+      --fish <($out/bin/rosa completion fish) \
+      --zsh <($out/bin/rosa completion zsh)
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = rosa;
+    command = "rosa version --client";
+  };
+
+  meta = with lib; {
+    description = "CLI for the Red Hat OpenShift Service on AWS";
+    license = licenses.asl20;
+    homepage = "https://github.com/openshift/rosa";
+    maintainers = with maintainers; [ jfchevrette ];
+  };
+}