luaPackages.busted: install shell completion via installShellCompletion

This commit is contained in:
Matthieu Coudron 2022-06-13 11:09:38 +02:00
parent dd9df750ba
commit 75a0709f67

View file

@ -15,13 +15,17 @@ with prev;
});
busted = prev.busted.overrideAttrs(oa: {
nativeBuildInputs = [
pkgs.installShellFiles
];
postConfigure = ''
substituteInPlace ''${rockspecFilename} \
--replace "'lua_cliargs = 3.0-1'," "'lua_cliargs >= 3.0-1',"
'';
postInstall = ''
install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted
install -D completions/bash/busted.bash $out/share/bash-completion/completions/busted
installShellCompletion --cmd busted \
--zsh completions/zsh/_busted \
--bash completions/bash/busted.bash
'';
});