[arch-haskell] Thoughts on Procedure

Rémy Oudompheng remyoudompheng at gmail.com
Sun Oct 17 10:11:56 EDT 2010


On 2010/10/15 Magnus Therning <magnus at therning.org> wrote:
> Taking it one step further:
>
> • Replace archhaskell/habs with a single version-controlled file
> containing tuples of <package name, package version>.
> • Make use of bauerbill's already existing support for hackage.  (I
> don't know anything about the internals of bauerbill, but it might
> need some extending to closer match what cabal2arch does.)

I pushed several additions to the archlinux library, and wrote a small
script that sketches this part of the procedure. First some comments :
* raw Cabal files from 00-index.tar.gz cannot be converted right away
to PKGBUILDs, thay must first go through a configuration procedure,
which is implemented in Cabal2Arch: I copied the relevant code to the
function Distribution.Archlinux.CabalTranslation.preprocessCabal
* I added a module Distribution.ArchLinux.HackageTranslation which
gives two main functions:
 - getCabalsFromTarball turns a tarball (ByteString) to a list on
GenericPackageDescription
 - getSpecifiedCabalsFromTarball takes a [String] as additional
argument to extract only several items
   The [String] argument is a set of lines like in the attached PKGLIST file.

GenericPackageDescription variables can be fed to preprocessCabal and
cabal2pkg to produce PKGBUILD

See the attached script for an example.

-- 
Rémy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PKGLIST
Type: application/octet-stream
Size: 335 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/arch-haskell/attachments/20101017/e8e023e1/PKGLIST.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: batch-c2a.hs
Type: text/x-haskell
Size: 1378 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/arch-haskell/attachments/20101017/e8e023e1/batch-c2a.bin


More information about the arch-haskell mailing list