[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux, with GHC and other key tools available via the [[Official Repositories|official repositories]], a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org]'s library database [https://aur.archlinux.org/packages.php?O=0&K=haskell- available in the AUR].

[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux, with GHC and other key tools available via the [[Official Repositories|official repositories]], a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org]'s library database [https://aur.archlinux.org/packages.php?O=0&K=haskell- available in the AUR].

+

The AUR packages, especially those owned by archhaskell, are deprecated. It is better to use and contribute to the [haskell] repository.

−

The community around Haskell on Arch is active and well organized, but your help is always welcome.

+

The community around Haskell on Arch is dying but in the process of revival, so your help is especially welcome!

Our policy for [extra] is to provide the Haskell platform, and popular Haskell applications.

Our policy for [extra] is to provide the Haskell platform, and popular Haskell applications.

−

==== [community] ====

+

=== [community] ===

* [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 other popular Haskell packages]

* [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 other popular Haskell packages]

[community] provides additional packages that are popular and not part of the Haskell platform, such as [[xmonad]].

[community] provides additional packages that are popular and not part of the Haskell platform, such as [[xmonad]].

+

These packages are also provided by the [haskell] repo below.

+

So, if you just want to use a few popular packages, you can just use what is provided by the official Arch repos.

+

But if you want to use Haskell more seriously, read on.

−

==== [haskell] ====

+

=== [haskell] ===

The [haskell] repository is the official repository of packages maintained by the ArchHaskell team. This repository represents the last tier of stability, before resorting to the packages in the AUR, or perhaps building packages yourself with cabal2arch. [haskell] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}}:

The [haskell] repository is the official repository of packages maintained by the ArchHaskell team. This repository represents the last tier of stability, before resorting to the packages in the AUR, or perhaps building packages yourself with cabal2arch. [haskell] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}}:

Line 31:

Line 35:

The set of packages in the [haskell] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].

The set of packages in the [haskell] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].

−

==== AUR ====

+

Putting [haskell] above [extra] will ensure that the packages from [haskell] take precedence, in case of duplicate packages in the two repositories.

+

+

=== [haskell-extra] and [haskell-web] ===

+

We are moving towards the possibility of distributing the desired contents of [haskell] (that is, all of Hackage) over several repositories (that is, distributing maintenance), while still collecting them all in a single repository.

+

The first test towards this is [https://github.com/EffeErre/habs-extra habs-extra], which is also provided as a repository to be added to {{ic|/etc/pacman.conf}}:

+

+

[haskell-extra]

+

Server = http://archhaskell.mynerdside.com/$repo/$arch

+

+

This should currently be used in conjunction with [haskell], because it provides additional packages while re-using those already provided by [haskell].

+

More details are available in this [http://www.haskell.org/pipermail/arch-haskell/2012-September/002147.html message], and in the README on github.

+

+

There is also [haskell-web], as mentioned [http://www.haskell.org/pipermail/arch-haskell/2012-October/002214.html here].

A huge number (almost 2000) packages built from http://hackage.haskell.org.

A huge number (almost 2000) packages built from http://hackage.haskell.org.

−

These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:

+

These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed like regular [[Arch User Repository|AUR]] packages.

−

+

−

# paktahn -S haskell-csv

+

Anything not found here can be installed via {{pkg|cabal-install}} directly from Hackage.

Anything not found here can be installed via {{pkg|cabal-install}} directly from Hackage.

−

Unfortunately, many of the packages in the AUR are outdated due to a lack of resources. In practice, one uses the cabal2arch program to create [[PKGBUILD]]s directly from Hackage.

+

Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.

+

In practice, one could use the cabal2arch program to create [[PKGBUILD]]s directly from Hackage.

+

But now it is recommended to use cblrepo and create something like [haskell-extra], which can then be added to the collection of haskell-providing repositories.

== Guidelines ==

== Guidelines ==

+

+

{{out of date|this and remaining sections may be out of date given the move to distributed repositories}}

+

In almost all cases, cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:

In almost all cases, cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:

Line 160:

Line 181:

* Use executable stripping, {{ic|--enable-executable-stripping}}. cabal2arch will do this automatically.

* Use executable stripping, {{ic|--enable-executable-stripping}}. cabal2arch will do this automatically.

+

+

== Haskell Build Order ==

+

* haskell-x11 update: haskell-x11-xft -> xmonad -> xmonad-contrib

Revision as of 20:44, 25 October 2012

Haskell is well supported on Arch Linux, with GHC and other key tools available via the official repositories, a growing number of packages made available by the ArchHaskell group, and a large part of hackage.haskell.org's library database available in the AUR.
The AUR packages, especially those owned by archhaskell, are deprecated. It is better to use and contribute to the [haskell] repository.

The community around Haskell on Arch is dying but in the process of revival, so your help is especially welcome!

[extra]

[community]

[community] provides additional packages that are popular and not part of the Haskell platform, such as xmonad.
These packages are also provided by the [haskell] repo below.
So, if you just want to use a few popular packages, you can just use what is provided by the official Arch repos.
But if you want to use Haskell more seriously, read on.

[haskell]

The [haskell] repository is the official repository of packages maintained by the ArchHaskell team. This repository represents the last tier of stability, before resorting to the packages in the AUR, or perhaps building packages yourself with cabal2arch. [haskell] can be accessed by adding the following entry to /etc/pacman.conf:

The set of packages in the [haskell] repository is derived from the habs tree officially located here. A tool called cblrepo is used to keep the habs tree synchronized with the official Haskell packages from Hackage.

Putting [haskell] above [extra] will ensure that the packages from [haskell] take precedence, in case of duplicate packages in the two repositories.

[haskell-extra] and [haskell-web]

We are moving towards the possibility of distributing the desired contents of [haskell] (that is, all of Hackage) over several repositories (that is, distributing maintenance), while still collecting them all in a single repository.
The first test towards this is habs-extra, which is also provided as a repository to be added to /etc/pacman.conf:

This should currently be used in conjunction with [haskell], because it provides additional packages while re-using those already provided by [haskell].
More details are available in this message, and in the README on github.

AUR

These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed like regular AUR packages.

Anything not found here can be installed via cabal-install directly from Hackage.

Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.
In practice, one could use the cabal2arch program to create PKGBUILDs directly from Hackage.
But now it is recommended to use cblrepo and create something like [haskell-extra], which can then be added to the collection of haskell-providing repositories.

Guidelines

In almost all cases, cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:

Add the [haskell] repository to /etc/pacman.conf and use pacman to install the latest release.

All libraries that the package depend on are listed (libraries shipped with GHC are dealt with by having the ghc package provide them)

It uses cabal to generate a post-install register/unregister script, with a standard name.

We use haddock to build the documentation.

All Haskell libraries should follow these naming conventions, and using the latest release of cabal2arch will ensure this is the case.

Note: Beginning with cabal2archAUR 1.1-2, a new environment variable, PKGBUILD_HASKELL_ENABLE_PROFILING, is generated into the PKGBUILD. If this variable is of non-zero length, such as "1" or "true", then profiling builds will occur. Thus, if a user desires profiling, then it is advised to export this environment variable in a file such as ~/.bashrc or ~/.zshrc.

Guidelines for Libraries

In general, each .cabal file should map to one PKGBUILD. The following conventions hold:

all libraries that are depended on must be listed in the depends array in the PKGBUILD

be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the gtk2hs package, not , e.g. "haskell-cairo"

Registering Haskell libraries is done via a register hook, see above.

Guidelines for Programs

Have their normal name. Examples: hmp3, xmonad, ghc, cabal-install

Be careful about dynamically linked run-time dependencies on C. For example, all GHC-produced binaries have a run-time dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.

Use executable stripping, --enable-executable-stripping. cabal2arch will do this automatically.