The cabal-rpm package

[Tags:gpl, program]

This package provides a RPM packaging tool for Haskell Cabal-based packages.

cblrpm has commands to generate a RPM spec file and srpm for a package. It can rpmbuild packages, yum/dnf install their dependencies, prep packages, and install them. There are commands to list package dependencies and missing dependencies. The diff command compares the current spec file with a freshly generated one, the update command updates the spec file to latest version from Hackage, and the refresh command updates the spec file to the current cabal-rpm packaging.

[Skip to Readme]


Versions 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3.1, 0.3.2, 0.3.3, 0.4, 0.5, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.8.10, 0.8.11, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5,, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.10.0, 0.10.1, 0.11, 0.11.1, 0.11.2
Change log ChangeLog
Dependencies base (<5), Cabal (>1.10 && <1.25), directory, filepath, old-locale (>=1 && <1.1), process, time (>=1.2 && <1.7), unix [details]
License GPL-3
Copyright 2007-2008 Bryan O'Sullivan <>, 2012-2017 Jens Petersen <>
Author Jens Petersen <>, Bryan O'Sullivan <>
Maintainer Jens Petersen <>
Category Distribution
Home page
Bug tracker
Source repository head: git clone
Uploaded Mon Jul 31 15:06:49 UTC 2017 by JensPetersen
Distributions Fedora:0.11, LTSHaskell:0.11.2, NixOS:0.11.2, Tumbleweed:0.11.1
Downloads 11146 total (209 in the last 30 days)
1 []
Status Docs not available [build log]
Last success reported on 2017-07-31 [all 3 reports]
Hackage Matrix CI



Use old-locale and time < 1.5


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for cabal-rpm

Readme for cabal-rpm-0.11.2

Build Status Hackage Stackage LTS Stackage Nightly


cabal-rpm is a tool for RPM packaging of Haskell Cabal-based packages. It interacts with yum/dnf to install build dependencies and can also act as a cabal-install wrapper installing dependencies packaged in Fedora before running "cabal install".

Cabal-rpm was originally created by Bryan O'Sullivan (see README.orig) but has since been updated to work with current Cabal and Fedora Packaging Guidelines replacing cabal2spec. It is used by Fedora and OpenSuSE. It is licensed under the terms of the GPL version 3 (see the COPYING file).

You can build from source as normal by running cabal install or via Hackage with cabal install cabal-rpm.


cabal-rpm assumes you are using ghc-rpm-macros for Haskell RPM packaging. It currently needs Cabal 1.10 or later to build (ie ghc 7 or later).


The package is on Hackage. If you have cabal-install (part of Haskell Platform) you can install simply with

$ cabal install cabal-rpm


To create a .spec file for a Haskell src package in the current dir:

$ cabal-rpm spec

or directly on a .cabal file:

$ cabal-rpm spec path/to/mypkg.cabal

or on a package source dir:

$ cabal-rpm spec mypkg-0.1

You can also package directly from hackage:

$ cabal-rpm srpm somepkg


$ cabal-rpm local somepkg-0.1

will unpack 'somepkg-0.1' from hackage (if the dir does not exist, otherwise it uses the existing dir), create a spec file for it, and build it.

cabal-rpm creates .spec files in the current dir and if a .spec file already exists it will append .cblrpm to the generated filename to avoid overwriting an existing file.

$ cabal-rpm install [pkg][-ver]

will yum/dnf install available missing dependencies and run "cabal install" to build the package.

$ cabal-rpm diff

diffs the current spec file with a freshly generated spec file.

$ cabal-rpm update

updates the package to the latest Hackage version

$ cabal-rpm refresh

updates the spec file to the current cabal-rpm packaging.

There are more commands: prep, builddep, depends, requires, missingdeps. See the manpage or help output for more details.


The latest source code is available from:


More features are planned and patches welcome. See the TODO file for more details.