judah/pier

Figure out story for Custom setup scripts

judah opened this issue · 2 comments

judah commented

How should we support packages like proto-lens or gl that generate Haskell modules with a custom Setup file? Allow custom user rules? Actually just run their Setup script?

Some specific packages:

  • happy, alex: generate template data-files by compiling and running a program with different CPP flags.
  • pandoc: installs man page
  • semigroupoids, comonad, distributive: use cabal-doctest
  • lens: uses cabal-doctest, and also installs an image to be used by the haddocks
  • entropy: runs a test C program, not sure for what purpose
  • darcs: generates a custom Version.hs module for embedding more specific version information; also custom logic for linking against libiconv, similar to what used to be in haskeline
  • gtk2hs: packages like glib use gtk2hs-buildtools:Gtk2HsSetup

Actually just run their Setup script?

Isn't that basically the only option? Since shake is designed to pick up new dependencies as it goes, is there a way to inspect the results of running Setup, add them to the mix, and carry on?

Several of these no longer use a custom Setup.hs. The 3 I checked:

ekmett/gl@dba7d55
haskell/happy@f2bef50
jgm/pandoc@e8fba10