mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-28 08:00:17 +02:00
luarocks: add bash/zsh completion
This commit is contained in:
parent
8d8a28b47b
commit
a9667fc80f
|
@ -5,6 +5,7 @@
|
|||
, zip
|
||||
# some packages need to be compiled with cmake
|
||||
, cmake
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -37,9 +38,9 @@ stdenv.mkDerivation rec {
|
|||
fi
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
lua curl makeWrapper which
|
||||
];
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
|
||||
buildInputs = [ lua curl which ];
|
||||
|
||||
postInstall = ''
|
||||
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
|
||||
|
@ -52,6 +53,9 @@ stdenv.mkDerivation rec {
|
|||
--suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua"
|
||||
}
|
||||
done
|
||||
|
||||
installShellCompletion --cmd luarocks --bash <($out/bin/luarocks completion bash)
|
||||
installShellCompletion --cmd luarocks --zsh <($out/bin/luarocks completion zsh)
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ zip unzip cmake ];
|
||||
|
|
Loading…
Reference in a new issue