haskell: add nix-specific fixes for various packages in stackage

With these overrides, nearly all of the stackage packages in the latest
stackage release should compile now.
This commit is contained in:
Benno Fünfstück 2017-02-18 14:33:26 +01:00
parent 7901a7a65f
commit 17c5ca9018
2 changed files with 61 additions and 26 deletions

View File

@ -41,6 +41,8 @@ self: super: {
nanospec = dontCheck super.nanospec; nanospec = dontCheck super.nanospec;
options = dontCheck super.options; options = dontCheck super.options;
statistics = dontCheck super.statistics; statistics = dontCheck super.statistics;
# segfault due to missing return: https://github.com/haskell/c2hs/pull/184
c2hs = dontCheck super.c2hs; c2hs = dontCheck super.c2hs;
# This test keeps being aborted because it runs too quietly for too long # This test keeps being aborted because it runs too quietly for too long
@ -228,7 +230,6 @@ self: super: {
wai-middleware-hmac = dontCheck super.wai-middleware-hmac; wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
xkbcommon = dontCheck super.xkbcommon; xkbcommon = dontCheck super.xkbcommon;
xmlgen = dontCheck super.xmlgen; xmlgen = dontCheck super.xmlgen;
hapistrano = dontCheck super.hapistrano;
HerbiePlugin = dontCheck super.HerbiePlugin; HerbiePlugin = dontCheck super.HerbiePlugin;
wai-cors = dontCheck super.wai-cors; wai-cors = dontCheck super.wai-cors;
@ -278,7 +279,6 @@ self: super: {
dotfs = dontCheck super.dotfs; # http://hydra.cryp.to/build/498599/log/raw dotfs = dontCheck super.dotfs; # http://hydra.cryp.to/build/498599/log/raw
DRBG = dontCheck super.DRBG; # http://hydra.cryp.to/build/498245/nixlog/1/raw DRBG = dontCheck super.DRBG; # http://hydra.cryp.to/build/498245/nixlog/1/raw
ed25519 = dontCheck super.ed25519; ed25519 = dontCheck super.ed25519;
either-unwrap = dontCheck super.either-unwrap; # http://hydra.cryp.to/build/498782/log/raw
etcd = dontCheck super.etcd; etcd = dontCheck super.etcd;
fb = dontCheck super.fb; # needs credentials for Facebook fb = dontCheck super.fb; # needs credentials for Facebook
fptest = dontCheck super.fptest; # http://hydra.cryp.to/build/499124/log/raw fptest = dontCheck super.fptest; # http://hydra.cryp.to/build/499124/log/raw
@ -307,7 +307,6 @@ self: super: {
hi = dontCheck super.hi; hi = dontCheck super.hi;
hierarchical-clustering = dontCheck super.hierarchical-clustering; hierarchical-clustering = dontCheck super.hierarchical-clustering;
hmatrix-tests = dontCheck super.hmatrix-tests; hmatrix-tests = dontCheck super.hmatrix-tests;
hPDB-examples = dontCheck super.hPDB-examples;
hquery = dontCheck super.hquery; hquery = dontCheck super.hquery;
hs2048 = dontCheck super.hs2048; hs2048 = dontCheck super.hs2048;
hsbencher = dontCheck super.hsbencher; hsbencher = dontCheck super.hsbencher;
@ -427,9 +426,6 @@ self: super: {
# https://github.com/NixOS/nixpkgs/issues/6350 # https://github.com/NixOS/nixpkgs/issues/6350
paypal-adaptive-hoops = overrideCabal super.paypal-adaptive-hoops (drv: { testTarget = "local"; }); paypal-adaptive-hoops = overrideCabal super.paypal-adaptive-hoops (drv: { testTarget = "local"; });
# https://github.com/afcowie/http-streams/issues/80
http-streams = dontCheck super.http-streams;
# https://github.com/vincenthz/hs-asn1/issues/12 # https://github.com/vincenthz/hs-asn1/issues/12
asn1-encoding = dontCheck super.asn1-encoding; asn1-encoding = dontCheck super.asn1-encoding;
@ -451,9 +447,6 @@ self: super: {
apiary-session = dontCheck super.apiary-session; apiary-session = dontCheck super.apiary-session;
apiary-websockets = dontCheck super.apiary-websockets; apiary-websockets = dontCheck super.apiary-websockets;
# https://github.com/alephcloud/hs-configuration-tools/issues/40
configuration-tools = dontCheck super.configuration-tools;
# HsColour: Language/Unlambda.hs: hGetContents: invalid argument (invalid byte sequence) # HsColour: Language/Unlambda.hs: hGetContents: invalid argument (invalid byte sequence)
unlambda = dontHyperlinkSource super.unlambda; unlambda = dontHyperlinkSource super.unlambda;
@ -695,13 +688,6 @@ self: super: {
cairo = addBuildTool super.cairo self.gtk2hs-buildtools; cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
pango = disableHardening (addBuildTool super.pango self.gtk2hs-buildtools) ["fortify"]; pango = disableHardening (addBuildTool super.pango self.gtk2hs-buildtools) ["fortify"];
# Fix tests which would otherwise fail with "Couldn't launch intero process."
intero = overrideCabal super.intero (drv: {
postPatch = (drv.postPatch or "") + ''
substituteInPlace src/test/Main.hs --replace "\"intero\"" "\"$PWD/dist/build/intero/intero\""
'';
});
# https://github.com/commercialhaskell/stack/issues/3001 # https://github.com/commercialhaskell/stack/issues/3001
stack = doJailbreak super.stack; stack = doJailbreak super.stack;
@ -736,14 +722,7 @@ self: super: {
}); });
# test suite cannot find its own "idris" binary # test suite cannot find its own "idris" binary
idris = overrideCabal super.idris (drv: { idris = dontCheck super.idris;
# "idris" binary cannot find Idris library otherwise while building. After
# installing it's completely fine though. This seems like a bug in Idris
# that's related to builds with shared libraries enabled. It would be great
# if someone who knows a thing or two about Idris could look into this.
preBuild = "export LD_LIBRARY_PATH=$PWD/dist/build:$LD_LIBRARY_PATH";
doCheck = false;
});
# https://github.com/bos/math-functions/issues/25 # https://github.com/bos/math-functions/issues/25
math-functions = dontCheck super.math-functions; math-functions = dontCheck super.math-functions;

View File

@ -167,6 +167,13 @@ self: super: builtins.intersectAttrs super {
http-client-tls = dontCheck super.http-client-tls; http-client-tls = dontCheck super.http-client-tls;
http-conduit = dontCheck super.http-conduit; http-conduit = dontCheck super.http-conduit;
transient-universe = dontCheck super.transient-universe; transient-universe = dontCheck super.transient-universe;
typed-process = dontCheck super.typed-process;
js-jquery = dontCheck super.js-jquery;
hPDB-examples = dontCheck super.hPDB-examples;
configuration-tools = dontCheck super.configuration-tools; # https://github.com/alephcloud/hs-configuration-tools/issues/40
tcp-streams = dontCheck super.tcp-streams;
holy-project = dontCheck super.holy-project;
mustache = dontCheck super.mustache;
# Tries to mess with extended POSIX attributes, but can't in our chroot environment. # Tries to mess with extended POSIX attributes, but can't in our chroot environment.
xattr = dontCheck super.xattr; xattr = dontCheck super.xattr;
@ -378,13 +385,62 @@ self: super: builtins.intersectAttrs super {
idris = overrideCabal super.idris (drv: { idris = overrideCabal super.idris (drv: {
# https://github.com/idris-lang/Idris-dev/issues/2499 # https://github.com/idris-lang/Idris-dev/issues/2499
librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.gmp]; librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.gmp];
# tests and build run executable, so need to set LD_LIBRARY_PATH
preBuild = ''
export LD_LIBRARY_PATH="$PWD/dist/build:$LD_LIBRARY_PATH"
'';
}); });
libsystemd-journal = overrideCabal super.libsystemd-journal (old: { libsystemd-journal = overrideCabal super.libsystemd-journal (old: {
librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ]; librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
}); });
# Needs network in tests. # does not specify tests in cabal file, instead has custom runTest cabal hook,
typed-process = dontCheck super.typed-process; # so cabal2nix will not detect test dependencies.
either-unwrap = overrideCabal super.either-unwrap (drv: {
testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
});
hidapi = addExtraLibrary super.hidapi pkgs.libudev;
hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; };
discount = super.discount.override { markdown = pkgs.discount; };
# tests require working stack installation with all-cabal-hashes cloned in $HOME
stackage-curator = dontCheck super.stackage-curator;
# hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
io-streams = enableCabalFlag super.io-streams "NoInteractiveTests";
# requires autotools to build
secp256k1 = addBuildTools super.secp256k1 [ pkgs.autoconf pkgs.automake pkgs.libtool ];
# tests require git
hapistrano = addBuildTool super.hapistrano pkgs.git;
# requires webkitgtk API version 3 (webkitgtk 2.4 is the latest webkit supporting that version)
gi-javascriptcore = super.gi-javascriptcore.override { webkitgtk = pkgs.webkitgtk24x; };
gi-webkit = super.gi-webkit.override { webkit = pkgs.webkitgtk24x; };
# requires valid, writeable $HOME
hatex-guide = overrideCabal super.hatex-guide (drv: {
preConfigure = ''
${drv.preConfigure or ""}
export HOME=$PWD
'';
});
# Fails to link against with newer gsl versions because a deprecrated function
# was removed
hmatrix-gsl = super.hmatrix-gsl.override { gsl = pkgs.gsl_1; };
# tests run executable, relying on PATH
# without this, tests fail with "Couldn't launch intero process"
intero = overrideCabal super.intero (drv: {
preCheck = ''
export PATH="$PWD/dist/build/intero:$PATH"
'';
});
} }