Cabalizing exclusively C projects
J.Hage at uu.nl
Tue Nov 6 15:17:43 CET 2012
my situation is that I want to compile and install a certain C-executable through a .cabal file
(no Haskell involved at all). It is part of a larger system that features a LOT of Haskell.
I would like to be able to set the --prefix or the --bindir to some default from Cabal (i.e., not
by setting it on the command line, but in some way from the cabal file itself).
Do you know how this can be done? So that without worrying about it too much an executable
will end up where by default normal executables compiled with the other build-types
I also found the following two issues:
when doing a cabal install it complains at the end that
cabal: /Users/jur/Library/Haskell/ghc-7.4.1/lib/lvmrun-1.0/bin: does not exist
This is because the makefile does not install the executable there.
Is this a bug? Can it be circumvented?
I was also surprised to see that a package MUST be registered. Somewhere else
I saw it that only libraries must be registered and lvmrun is only an executable.
One more thing: when I execute cabal sdist
Distribution quality errors:
No 'Main-Is' field found for executable lvmrun
Unknown compiler 'GCC' in 'tested-with' field.
The 'license' field is missing or specified as AllRightsReserved.
Packages using 'cabal-version: >= 1.10' must specify the 'default-language'
field for each component (e.g. Haskell98 or Haskell2010). If a component uses
different languages in different modules then list the other ones in the
Note: the public hackage server would reject this package.
Warning: Cannot run preprocessors. Run 'configure' command first.
Do you think uploading the Cabal file for a C-only distro is impossible?
In the end, I may be better off rolling my own SetUp.hs. What do you think?
Would that make it possible for Cabal to pass own the standard location for
installing into the call to ./configure?
Sorry for all these questions, but I do not see any way out at the moment.
And I'd really like to see the Helium compiler on Hackage at some point.
More information about the cabal-devel