Fork of Debian packaging scripts for Haskell containing support for packaging executables




Builds Cabalized libraries, calculates Haskell dependencies, and adds postinst
and prerm Haskell scripts.

haskell-devscripts is a package that helps with building Haskell libraries.  It
does several things.  It can generate postinst and prerm scripts when
necessary.  It automates building libraries for the different supported Haskell
systems in Debian.  It generates substvars for your control file so that the
library packages depend on the appropriate packages.  In short, it can drive
the entire process.


dh_haskell assumes that your packages are adhering to the draft Haskell policy.

Your control file must build the binary library files using packages
named libghc-<name>-<variation>, where <name> is the name of your package; and
<variation> is dev, prof or doc. These packages should be Architecture: any
(dev, and proc) or all (doc).

The <prof> package contains profiling enabled libraries. Currently
only GHC supports profiling. Due to restrictions of the GHC compiler,
if you provide a <dev> package you should also provide a
corresponding <prof> package.

If you build a Hugs package, name it libhugs-<name>.  Most Hugs packages
should be Architecture: all.  If your package uses foreign methods,
maybe it should be Architecture: any (please let me know if you have
an answer to that).

dh_haskell assumes that the Haskell Cabal (see can
be used to build your package.  It obtains package name and version
information from the Cabal file.


Start from a basic debian/ directory.  Add entries to Build-Depends for
haskell-devscripts, cdbs and the compilers for any binaries you will build.

In the clause in control for each binary package, make sure to add
${haskell:Depends} to the Depends: line, ${haskell:Recommends} to the
Recommends line, and ${haskell:Suggests} to the Suggests line.

In rules, include /usr/share/cdbs/1/rules/ and

That's it.  haskell-devscripts does the rest.


See the Debian source packages for haskell-src-exts, haskell-ghc-paths.


hugs and ghc are the only supported targets at the moment.  Cabal does
not yet support nhc98.


The manpages of dh_haskell_depends(1), dh_haskell_provides(1) and


John Goerzen <>

Based on ideas in dh_python by Josselin Mouette <>