haskellPackages.cabal-install: install man page again

Previously, cabal-install had a custom Setup.hs which took care of
generating and installing the cabal(1) man page. While this file was a
bit of scary sight, it is certainly nice to have a man page properly
installed. For the 3.2.0.0 release they switched to the default setup
type again, so the man page isn't installed anymore. Fortunately the
cabal cli can generate the man page as well, so the override to add the
man page back is pretty simple.

The commit that introduced this is the following:
91ac075930
I actually made a mental note of this a few weeks ago already, but it
slipped my mind when we updated to cabal-install 3.2.0.0 two weeks ago
unfortunately.
wip/yesman
sternenseemann 3 years ago
parent c12f499ce0
commit 404e61ab5e
  1. 15
      pkgs/development/haskell-modules/configuration-common.nix

@ -1602,4 +1602,19 @@ self: super: {
];
});
# cabal-install switched to build type simple in 3.2.0.0
# as a result, the cabal(1) man page is no longer installed
# automatically. Instead we need to use the `cabal man`
# command which generates the man page on the fly and
# install it to $out/share/man/man1 ourselves in this
# override.
# The commit that introduced this change:
# https://github.com/haskell/cabal/commit/91ac075930c87712eeada4305727a4fa651726e7
cabal-install = overrideCabal super.cabal-install (old: {
postInstall = old.postInstall + ''
mkdir -p "$out/share/man/man1"
"$out/bin/cabal" man --raw > "$out/share/man/man1/cabal.1"
'';
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

Loading…
Cancel
Save