Add support for jailbreak-cabal utility to the Cabal builder.

Jailbreaks-cabal allows Nixpkgs maintainers to quick-fix builds of packages
that over-specify their version requirements by removing the version
restrictions of all dependencies from the Cabal file. Set

  jailbreak = true

in the build expression to activate this feature.
This commit is contained in:
Peter Simons 2012-09-06 14:59:07 +02:00
parent 2ccd0238cb
commit 470ade254e

View File

@ -1,6 +1,6 @@
# generic builder for Cabal packages
{stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, enableLibraryProfiling ? false} :
{ stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal, enableLibraryProfiling ? false }:
{
mkDerivation =
args : # arguments for the individual package, can modify the defaults
@ -86,7 +86,8 @@
configurePhase = ''
eval "$preConfigure"
for i in Setup.hs Setup.lhs; do
${lib.optionalString (lib.attrByPath ["jailbreak"] false self) "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal && "
}for i in Setup.hs Setup.lhs; do
test -f $i && ghc --make $i
done