nodePackages.manta: add completion

This commit is contained in:
teutat3s 2022-01-20 19:08:46 +01:00
parent b4797eaffc
commit 75902bb873
No known key found for this signature in database
GPG Key ID: 18DAE600A6BBE705

View File

@ -199,6 +199,19 @@ let
'';
};
manta = super.manta.override {
nativeBuildInputs = with pkgs; [ nodejs-12_x installShellFiles ];
postInstall = ''
# create completions, following upstream procedure https://github.com/joyent/node-manta/blob/v5.2.3/Makefile#L85-L91
completion_cmds=$(find ./bin -type f -printf "%f\n")
node ./lib/create_client.js
for cmd in $completion_cmds; do
installShellCompletion --cmd $cmd --bash <(./bin/$cmd --completion)
done
'';
};
markdownlint-cli = super.markdownlint-cli.override {
meta.mainProgram = "markdownlint";
};