
On 17/10/10 15:11, Rémy Oudompheng wrote:
On 2010/10/15 Magnus Therning
wrote: Taking it one step further:
• Replace archhaskell/habs with a single version-controlled file containing tuples of
. • 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
Ah, yes, that's the finalisation process, basically nailing down some stuff in order to make the cabal stuff concrete. A short description can be found at [1].
* 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.
Cool. Are you also going to make cabal2arch use those new functions?
GenericPackageDescription variables can be fed to preprocessCabal and cabal2pkg to produce PKGBUILD
See the attached script for an example.
I have to say I love the steady improvements on our tools. I would really like to make a new release soon though, especially due to the recent addition of 'packages()' in the generated code. Remi, Peti, are there any outstanding stuff you would like to get in before we bump the version number and push a new release to Hackage? /M [1] http://therning.org/magnus/archives/514 -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe