diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 7d4736e066d3..6e63cca2c154 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -229,11 +229,7 @@ self: super: builtins.intersectAttrs super { # hledger* overrides inherit ( let - # Copy hledger man pages from the source tarball into the proper place. - # It always contains the relevant man page(s) at the top level. For - # hledger it additionally has all the other man pages in embeddedfiles/ - # which we ignore. - installHledgerManPages = overrideCabal (drv: { + installHledgerExtraFiles = overrideCabal (drv: { buildTools = drv.buildTools or [] ++ [ pkgs.buildPackages.installShellFiles ]; @@ -243,6 +239,10 @@ self: super: builtins.intersectAttrs super { done install -v -Dm644 *.info* -t "$out/share/info/" + + if [ -e shell-completion/hledger-completion.bash ]; then + installShellCompletion --name hledger shell-completion/hledger-completion.bash + fi ''; }); @@ -254,15 +254,15 @@ self: super: builtins.intersectAttrs super { }); in { - hledger = installHledgerManPages super.hledger; - hledger-web = installHledgerManPages (hledgerWebTestFix super.hledger-web); - hledger-ui = installHledgerManPages super.hledger-ui; + hledger = installHledgerExtraFiles super.hledger; + hledger-web = installHledgerExtraFiles (hledgerWebTestFix super.hledger-web); + hledger-ui = installHledgerExtraFiles super.hledger-ui; - hledger_1_30_1 = installHledgerManPages + hledger_1_30_1 = installHledgerExtraFiles (doDistribute (super.hledger_1_30_1.override { hledger-lib = self.hledger-lib_1_30; })); - hledger-web_1_30 = installHledgerManPages (hledgerWebTestFix + hledger-web_1_30 = installHledgerExtraFiles (hledgerWebTestFix (doDistribute (super.hledger-web_1_30.override { hledger = self.hledger_1_30_1; hledger-lib = self.hledger-lib_1_30;