nix-bash-completions: add missing pre/postInstall hooks

This commit is contained in:
Bjørn Forsman 2022-02-11 16:27:30 +01:00
parent ac1de6cfe5
commit 5153446c44

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
# To enable lazy loading via. bash-completion we need a symlink to the script
# from every command name.
installPhase = ''
runHook preInstall
commands=$(
function complete() { shift 2; echo "$@"; }
shopt -s extglob
@ -24,6 +26,8 @@ stdenv.mkDerivation rec {
for c in $commands; do
ln -s _nix $c
done
runHook postInstall
'';
meta = with lib; {