about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRyan Hendrickson <ryan.hendrickson@alum.mit.edu>2024-06-29 14:43:58 -0400
committerGitHub <noreply@github.com>2024-06-29 14:43:58 -0400
commit2a0146ff9bc7e1809acfdd618cf66678721b1410 (patch)
tree3b680261d27984d63f7cf7c988806981fae613a8 /pkgs
parente8aa685f381463956d10752f003e7bf343ace6e1 (diff)
parentf7d0c482a2e29861aeb2fc8e00b6ecce16584acc (diff)
Merge pull request #319818 from florian-sanders-cc/clever-tools
clever-tools: init at 3.7.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/cl/clever-tools/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/cl/clever-tools/package.nix b/pkgs/by-name/cl/clever-tools/package.nix
new file mode 100644
index 0000000000000..056bf1b59482b
--- /dev/null
+++ b/pkgs/by-name/cl/clever-tools/package.nix
@@ -0,0 +1,44 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+, nodejs_18
+, installShellFiles
+}:
+
+buildNpmPackage rec {
+  pname = "clever-tools";
+
+  version = "3.7.0";
+
+  nodejs = nodejs_18;
+
+  src = fetchFromGitHub {
+    owner = "CleverCloud";
+    repo = "clever-tools";
+    rev = version;
+    hash = "sha256-Ce7lk+zTbyj3HmtIFui9ZA1FThZEytovrPCrmjMyX38=";
+  };
+
+  npmDepsHash = "sha256-VQXljlIHAE2o10cXQlsyhTvBSp3/ycQOJydQGNMiWuk=";
+
+  dontNpmBuild = true;
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd clever \
+      --bash <($out/bin/clever --bash-autocomplete-script) \
+      --zsh <($out/bin/clever --zsh-autocomplete-script)
+    rm $out/bin/install-clever-completion
+    rm $out/bin/uninstall-clever-completion
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/CleverCloud/clever-tools";
+    changelog = "https://github.com/CleverCloud/clever-tools/blob/${version}/CHANGELOG.md";
+    description = "Deploy on Clever Cloud and control your applications, add-ons, services from command line";
+    license = licenses.asl20;
+    mainProgram = "clever";
+    maintainers = teams.clevercloud.members;
+  };
+}