luarocks: add luarocks-admin completion
This commit is contained in:
@@ -67,7 +67,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
|
||||
substituteInPlace $out/etc/luarocks/* \
|
||||
--replace '${lua.luaOnBuild}' '${lua}'
|
||||
''
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd luarocks \
|
||||
--bash <($out/bin/luarocks completion bash) \
|
||||
--fish <($out/bin/luarocks completion fish) \
|
||||
--zsh <($out/bin/luarocks completion zsh)
|
||||
|
||||
installShellCompletion --cmd luarocks-admin \
|
||||
--bash <($out/bin/luarocks-admin completion bash) \
|
||||
--fish <($out/bin/luarocks-admin completion fish) \
|
||||
--zsh <($out/bin/luarocks-admin completion zsh)
|
||||
''
|
||||
+ ''
|
||||
for i in "$out"/bin/*; do
|
||||
test -L "$i" || {
|
||||
wrapProgram "$i" \
|
||||
@@ -79,11 +91,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
lib.optionals (finalAttrs.pname == "luarocks-nix") [ file nix-prefetch-git ])}
|
||||
}
|
||||
done
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd luarocks \
|
||||
--bash <($out/bin/luarocks completion bash) \
|
||||
--fish <($out/bin/luarocks completion fish) \
|
||||
--zsh <($out/bin/luarocks completion zsh)
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ zip unzip cmake ];
|
||||
|
||||
Reference in New Issue
Block a user