[arch-haskell] packaging the haskell platform: another shot

Thomas Girod girodt at gmail.com
Sat Oct 12 07:36:16 UTC 2013


Hi people.

yesterday I tried to write a PKGBUILD for the haskell-platform. it looks
like this (work in progress):

----

pkgname=haskell-platform
pkgver=2010.1.0.0
pkgrel=1
pkgdesc="the haskell platform"
arch=('i686' 'x86_64')
url="http://hackage.haskell.org/platform/"
license=('BSD')
groups=()
depends=('ghc>=6.12.1')
makedepends=()
optdepends=()
provides=('cabal-install=0.8.0' 'alex=2.3.2' 'happy=1.18.4'
'haddock=2.7.2' 'haskell-cgi=3001.1.7.2' 'haskell-fgl=5.4.2.2'
'haskell-glut=2.1.2.1' 'haskell-haskell-src=1.0.1.3'
'haskell-html=1.0.1.2' 'haskell-hunit=1.2.2.1' 'haskell-mtl=1.1.0.2'
'haskell-network=2.2.1.7' 'haskell-opengl=2.2.3.0'
'haskell-parallel=2.2.0.1' 'haskell-parsec=2.1.0.1'
'haskell-quickcheck=2.1.0.3' 'haskell-regex-base=0.93.1'
'haskell-regex-compat=0.92' 'haskell-regex-posix=0.94.1'
'haskell-stm=2.1.1.2' 'haskell-xhtml=3000.2.0.1' 'haskell-zlib=0.5.2.0'
'haskell-http=4000.0.9' 'haskell-deepseq=1.1.0.0')
conflicts=()
replaces=()
backup=()
options=()
install=
source=(http://hackage.haskell.org/platform/$pkgver/$pkgname-$pkgver.tar.gz)
noextract=()
md5sums=('ad96a12535b955f2f5e11769b02e0f76')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR="$pkgdir/" install
}

----

as you can see, it is supposed to build *all* the platform in one
bundle, and it uses the "provides" field to list all the packages
offered by the platform, rather than building its content through
dependencies.

If one wants to have the platform version and the bleeding edge of a
package, it might be problematic. A possible solution could be to use a
different naming scheme for non-platform versions, like using the prefix
"hackage-" rather than "haskell-" for example.

Well I guess there are reasons for not using this approach already, and
I'm not seeing them. If it is the case, I would be glad to hear them.


----

note : the above script doesn't work, for sure I did some stuff wrong.
Maybe it could be better to use the cabalized version of the
haskell-platform and then declare cabal-install, alex, happy and haddock
as external dependencies - but then if any of those gets pushed ahead of
the platform, it *will* cause troubles.

Tom



More information about the arch-haskell mailing list