mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #136507 from teto/luarocks-completion
luarocks: add bash/zsh completion
This commit is contained in:
commit
e4f82b3722
@ -5,6 +5,7 @@
|
|||||||
, zip
|
, zip
|
||||||
# some packages need to be compiled with cmake
|
# some packages need to be compiled with cmake
|
||||||
, cmake
|
, cmake
|
||||||
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -37,9 +38,9 @@ stdenv.mkDerivation rec {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||||
lua curl makeWrapper which
|
|
||||||
];
|
buildInputs = [ lua curl which ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
|
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"
|
--suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua"
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
installShellCompletion --cmd luarocks --bash <($out/bin/luarocks completion bash)
|
||||||
|
installShellCompletion --cmd luarocks --zsh <($out/bin/luarocks completion zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ zip unzip cmake ];
|
propagatedBuildInputs = [ zip unzip cmake ];
|
||||||
|
Loading…
Reference in New Issue
Block a user