Skip to content
A command line tool to generate Gentoo ebuilds from Hackage packages.
Haskell Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
HackPort cleanup: move 'defaultRemoteRepo' to 'HackPort.GlobalFlags' Apr 9, 2016
Portage Portage/EBuild.hs: switch to EAPI=6 Apr 9, 2016
cabal @ 620bde4
hackage-security @ b596a6f import hackage-security repository before syncing cabal Apr 9, 2016
.gitmodules import hackage-security repository before syncing cabal Apr 9, 2016
Cabal2Ebuild.hs Updated to 'HEAD' Cabal ( Apr 9, 2016
Error.hs get rid of Control.Monad.Error completely May 21, 2015
LICENSE hackport is GPL, so add the GPL license May 23, 2010
Merge.hs cleanup: drop local implementation of 'split' Apr 9, 2016
README.rst Overlays: simplify autodetection of hackport overlay Apr 9, 2016
Status.hs Updated to 'HEAD' Cabal ( Apr 9, 2016
TODO TODO: drop finished items Dec 1, 2012
mk_release_tarball.bash mk_release_tarball.bash: force 'ustar' format for 'tar' (new hackage'… May 29, 2014




Hackport is a utility application for Gentoo Linux to ease the tasks for the Haskell Project.

The main purpose for Hackport is to interact with Hackage and create Ebuilds from Cabal packages. It also does handy functions to compare hackage, the overlay and the portage tree.

Quick start

  1. Build hackport binary by hand (or install it from haskell overlay).
  2. Setup hackport database into overlay you plan to merge new ebuilds:
$ mkdir ~/overlays
$ cd ~/overlays
$ git clone git://
$ cd gentoo-haskell
$ mkdir .hackport
$ hackport update
$ ls -1 .hackport/
  1. Add your ~/overlays/gentoo-haskell to PORTDIR_OVERLAY in /etc/make.conf.

Done! Now you can hackport merge <package-name> to get an ebuild merged to your overlay!


'hackport update'
Update the local copy of hackage's package list. You should run this every once in a while to get a more recent copy.
'hackport list [FILTER]'
Print packages from hackage, with an optional substring matching.
'hackport merge <package>'

Create a Gentoo Linux Ebuild for hackage package named <package>. The category defaults to dev-haskell, but is overridden if an older version has been merged previously to another category. The category can also be overridden with the syntax category/package. Example:

$ hackport merge x11-wm/xmonad

Hackport will make an ebuild that uses the haskell-cabal eclass, and set the following properties:

PN (package name)
Package name converted into lower case
PV (package version)
Package version with tags dropped.
Defaults to ~amd64 ~x86
Set to "bin" for executables, and "lib haddock profile" for libraries. Packages that contains both a binary and library will get the union.
GHC dependency defaults to >=dev-lang/ghc-6.6.1. Cabal dependency is fetched from Cabal field 'Cabal-Version'. All other package dependencies are converted into gentoo syntax. Range dependencies are flattened and usually needs manual tweaking.
From Synopsis if it is non-empty, otherwise Description.
From Homepage
From package url
From cabal license converted into gentoo licenses
Defaults to "0"
'hackport diff [missing|additions|newer|common]'

Prints a list showing a diff between hackage and the overlay. For each package it shows the latest version in both hackage and the overlay.

Optional parameters:
'all', the default action
List all packages.
List packages that exist in hackage but not in the overlay, or where the hackage version is more recent.
List packages only in the overlay, or where the overlay has a more recent version.
List packages where hackage has a more recent version.
List packages where hackage and the overlay has the same version.
'hackport status [toportage]'

Provides an overview comparing the overlay to the portage tree. It will teel you, for each package and version, if the package exist

  • only in the portage tree

  • only in the overlay

  • both in the portage tree and the overlay

  • both in the portage tree and the overlay,

    but the ebuilds are not identical

Optional parameters:

Only print packages that are likely to be interesting to move to the portage tree. It will print packages when they exist in both portage and the overlay, and:

  • the ebuilds differ, or
  • the overlay has a more recent version
'hackport make-ebuild <category> <path/to/package.cabal>'
Generates standalone .ebuild file from .cabal spec and stores result to the overlay into <category>/<package> Option is useful for not-on-hackage packages and for debug purposes.

Henning Günther Duncan Coutts Lennart Kolmodin
Something went wrong with that request. Please try again.