blob: b1dcca9abf2d7e15b0e0d02da86019892013066f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib
, buildNpmPackage
, fetchFromGitHub
, nodejs_18
, installShellFiles
, stdenv
}:
buildNpmPackage rec {
pname = "clever-tools";
version = "3.8.1";
nodejs = nodejs_18;
src = fetchFromGitHub {
owner = "CleverCloud";
repo = "clever-tools";
rev = version;
hash = "sha256-8dxV57uivjcXz6JHttFNvivcIbNRAwZKSvGv/SST81E=";
};
npmDepsHash = "sha256-2lROdsq3tR4SYxMoTJYY6EyHxudS7p7wOJq+RxE2btk=";
dontNpmBuild = true;
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd clever \
--bash <($out/bin/clever --bash-autocomplete-script $out/bin/clever) \
--zsh <($out/bin/clever --zsh-autocomplete-script $out/bin/clever)
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;
};
}
|