about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/admin/qovery-cli/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/admin/qovery-cli/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/admin/qovery-cli/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/admin/qovery-cli/default.nix b/nixpkgs/pkgs/tools/admin/qovery-cli/default.nix
new file mode 100644
index 000000000000..c9239c0b6e9c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/admin/qovery-cli/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+, qovery-cli
+, testers
+}:
+
+buildGoModule rec {
+  pname = "qovery-cli";
+  version = "0.59.0";
+
+  src = fetchFromGitHub {
+    owner = "Qovery";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-EPnuCmkJrjj9STO/FlDNYZmyqTAgTHvqxTxmQcgJLmQ=";
+  };
+
+  vendorHash = "sha256-nW1PZ/cg7rU3e729H9I4Mqi/Q9wbSFMvtl0Urv9Fl8E=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd ${pname} \
+      --bash <($out/bin/${pname} completion bash) \
+      --fish <($out/bin/${pname} completion fish) \
+      --zsh <($out/bin/${pname} completion zsh)
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = qovery-cli;
+    command = "HOME=$(mktemp -d); ${pname} version";
+  };
+
+  meta = with lib; {
+    description = "Qovery Command Line Interface";
+    homepage = "https://github.com/Qovery/qovery-cli";
+    changelog = "https://github.com/Qovery/qovery-cli/releases/tag/v${version}";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}