[gobolinux-devel] Enhance Compile to support Haskell Cabal builds
Kevin Quick
quick at sparq.org
Fri Apr 11 11:44:26 NZST 2008
[Sorry Michael: my Spam filter ate your response, so I'm paraphrasing
here]
Attached is an updated version of this patch against the SVN for
Compile. It utilized runhooks and SandboxInstall. (Thanks due
Michael Homer for the pointers)
On 10 Apr 2008, at 12:01 AM, quick at sparq.org wrote:
> Attached is a patch that will upgrade Compile/MakeRecipe to support
> the Cabal
> build/library system (http://hackage.haskell.org/cabal) used for
> Haskell
> (GHC). This performs the build using the standard Haskell
> methodology,
> registering the results to make it available for import in Haskell
> programs.
> This also allows the easy reference to the Hackage library database
> (http://
> hackage.haskell.org/) for Haskell.
>
> No management of the local Cabal database is made beyond the initial
> registration; specifically DisableProgram, SymlinkProgram, and
> RemoveProgram
> will require corresponding manual modifications of the database
> (e.g. via ghc-
> pkg), but installation and upgrades of packages are handled quite
> nicely.
The issue here is that the Cabal database (visible via "$ ghc-pkg
list") should be told when a new version is selected or a version is
removed. It supports hide/show (like Gobo's DisableProgram/
EnableProgram) and unregister (viz. RemoveProgram). However, to
effectively perform these, all of the various Gobo Scripts would need
to look at the recipe type to detect a cabal recipe and then perform
the needed actions.
It's generally possible to do this, although it represents
significant modifications to the Scripts package; the current
implementation pretty much matches the functionality provided by
existing Haskell-implementing recipes, which use recipe_type of
manifest and then just do the runhaskell Setup operations in the
pre_install() hook manually.
If this package is going to move forward, then I would look into
Scripts updates, but I didn't want to spend the work if this patch
wasn't acceptable.
> Where is this database stored?
The cabal/ghc-pkg environment supports 2: a system one and a user
one. I'm modifying the system one in the above patch. The first
line of "$ ghc-pkg list" shows where the database is located.
> Is it necessary to use, or does it just provide extra
functionality somehow?
It's pretty much necessary to resolve Haskell import statements.
-KQ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Compile_add_cabal_2.patch
Type: application/octet-stream
Size: 2509 bytes
Desc: not available
Url : http://lists.gobolinux.org/pipermail/gobolinux-devel/attachments/20080410/b69ba0ba/attachment.obj
More information about the gobolinux-devel
mailing list