aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Fabian Kirchner <kirchner@posteo.de>2023-10-13 17:00:41 +0200
committerLibravatar Fabian Kirchner <kirchner@posteo.de>2023-10-13 17:00:41 +0200
commitd75b20d22540d0df74451db0160b1996c42263dd (patch)
tree9e2ce2056580b9619db00da8c683e593fea470d3
parente2b5c40354933424de970f3194aea5cd3ff142b9 (diff)
install completions for bash, fish and zsh
-rw-r--r--default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 88d00fe..02dfde3 100644
--- a/default.nix
+++ b/default.nix
@@ -8,10 +8,14 @@ let
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
anissue = (super.callCabal2nix "anissue" ./. { }).overrideAttrs (oldAttrs: {
+ nativeBuildInputs = [ pkgs.installShellFiles ];
postInstall = ''
exe=${oldAttrs.pname}
- mkdir -p $out/share/bash-completion/completions
- $out/bin/$exe --bash-completion-script $exe >$out/share/bash-completion/completions/$exe
+
+ installShellCompletion --cmd $exe \
+ --bash <($out/bin/$exe --bash-completion-script $exe) \
+ --fish <($out/bin/$exe --fish-completion-script $exe) \
+ --zsh <($out/bin/$exe --zsh-completion-script $exe)
'';
});
};