Hi,

I, too, ran into the requirement to have a compiled Haskell binary
print the Git hash it was derived from.  There's a package for that
(gitrev), which does not work to my satisfaction.

Investigation led me to a wider concept.  I now think that Cabal
should discern two sorts of generated files:

 1. Early generated files, that are not stored in the source
    repository but have to be present in a source distribution created
    by `cabal sdist`.

 2. Late generated files, that are also not in the source distribution
    but are created during compilation.

If that was possible, then the git hash problem would reduce to a
special case of the first sort.  (if it already is, where would I find
it documented?)

I've elaborated on this a bit, and provide my current attempt to
include a git hash into a binary at

    https://github.com/s5k6/versionInfo

which demonstrates the current issues when trying so implement such an
approach using current Cabal.  It also demonstrates the issue of the
current auto-generated `Paths_…` module depending on the `base`
package.

What do you think?

Cheers
Stefan


--
Stefan Klinger, Ph.D. -- computer scientist              o/X
http://stefan-klinger.de                                 /\/
https://github.com/s5k6                                    \
I prefer receiving plain text messages, not exceeding 32kB.
_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel

Reply via email to