mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 04:13:12 +00:00
clever-tools: 3.8.3 -> 3.9.0 (#350990)
This commit is contained in:
commit
b084db8b03
@ -4,13 +4,14 @@
|
||||
fetchFromGitHub,
|
||||
nodejs_18,
|
||||
installShellFiles,
|
||||
makeWrapper,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "clever-tools";
|
||||
|
||||
version = "3.8.3";
|
||||
version = "3.9.0";
|
||||
|
||||
nodejs = nodejs_18;
|
||||
|
||||
@ -18,27 +19,32 @@ buildNpmPackage rec {
|
||||
owner = "CleverCloud";
|
||||
repo = "clever-tools";
|
||||
rev = version;
|
||||
hash = "sha256-70wyu8+Jb9kR5lIucBZG9UWIufMhsgMBMkT2ohGvE50=";
|
||||
hash = "sha256-nSTcJIZO/CMliAYFUGu/oA+VdtONDPwyj6vCr5Ry6ac=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-LljwS6Rd/8WnGpxSHwCr87KWLaRR2i7sMdUuuprYiOE=";
|
||||
npmDepsHash = "sha256-+3/zSsO5+s1MUome3CQ1p1tN3OtWp+XE9Z6GSdDiRh8=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib/clever-tools
|
||||
cp build/clever.cjs $out/lib/clever-tools/clever.cjs
|
||||
|
||||
makeWrapperArgs = [ "--set NO_UPDATE_NOTIFIER true" ];
|
||||
makeWrapper ${nodejs}/bin/node $out/bin/clever \
|
||||
--add-flags "$out/lib/clever-tools/clever.cjs" \
|
||||
--set NO_UPDATE_NOTIFIER true
|
||||
|
||||
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
|
||||
'';
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
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)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/CleverCloud/clever-tools";
|
||||
|
Loading…
Reference in New Issue
Block a user