build-system/haskell: Generate Setup.hs if needed.
authorRobert Vollmert <rob@vllmrt.net>
Mon, 27 May 2019 19:56:18 +0000 (21:56 +0200)
committerTimothy Sample <samplet@ngyro.com>
Thu, 13 Jun 2019 17:30:24 +0000 (13:30 -0400)
commited8d3f33a5236a1b9fde80bf4ad04e0ecc22a47a
tree1eb581bcb3a4ade1381d449f89187b46136872bc
parent5f9f2c82e6829823cf5bb1cc27f8b1333a1e2096
build-system/haskell: Generate Setup.hs if needed.

The default Setup.hs is boilerplate that is frequently left out of
source packages.  Several packages already add a phase to generate it,
so moving this phase to the build system is just factoring out an
existing pattern.

See <https://github.com/phadej/time-compat/issues/4>.

* guix/build/haskell-build-system.scm (generate-setuphs): New procedure.
(%standard-phases): Add it after 'unpack'.
* gnu/packages/haskell.scm (ghc-foundation, ghc-inline-c,
ghc-inline-c-cpp, ghc-rio): Remove 'arguments'.

Signed-off-by: Timothy Sample <samplet@ngyro.com>
gnu/packages/haskell.scm
guix/build/haskell-build-system.scm