Skip to content

Commit

Permalink
fix bash-completion outputs
Browse files Browse the repository at this point in the history
Use "$out/share/bash-completion/completions" because it gets
automatically loaded by the bash-completions package if "$out/share" is
listed in the XDG_DATA_DIRS environment variable.

This combined with NixOS/nixpkgs#103501 will
mean that nix-shell environments can have completion available.
  • Loading branch information
zimbatm authored and Profpatsch committed Mar 7, 2022
1 parent e75df6b commit 936b15b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ wxcHook drv = drv & libraryDepends . system %~ Set.union (Set.fromList [pkg "lib
cabalInstallPostInstall :: String
cabalInstallPostInstall = unlines
[ "postInstall = ''"
, " mkdir $out/etc"
, " mv bash-completion $out/etc/bash_completion.d"
, " mkdir -p $out/share/bash-completion"
, " mv bash-completion $out/share/bash-completion/completions"
, "'';"
]

darcsInstallPostInstall :: String
darcsInstallPostInstall = unlines
[ "postInstall = ''"
, " mkdir -p $out/etc/bash_completion.d"
, " mv contrib/darcs_completion $out/etc/bash_completion.d/darcs"
, " mkdir -p $out/share/bash-completion/completions"
, " mv contrib/darcs_completion $out/share/bash-completion/completions/darcs"
, "'';"
]

Expand Down

0 comments on commit 936b15b

Please sign in to comment.