git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit17c5ca9018619d819c48e25add78f47d7d575611 authorBenno Fünfstück <benno.fuenfstueck@gmail.com> dateSat 18 Feb 2017, 14:33 (10 years ago) parent7901a7a
2 files changed+61−26
pkgs/development/haskell-modules/configuration-common.nix+3−24 pkgs/development/haskell-modules/configuration-nix.nix+58−2
pkgs/development/haskell-modules/configuration-common.nix+3−24
@@ -41,6 +41,8 @@ self: super: {
4141 nanospec = dontCheck super.nanospec;
4242 options = dontCheck super.options;
4343 statistics = dontCheck super.statistics;
44+
45+ # segfault due to missing return: https://github.com/haskell/c2hs/pull/184
4446 c2hs = dontCheck super.c2hs;
4547
4648 # This test keeps being aborted because it runs too quietly for too long
@@ -228,7 +230,6 @@ self: super: {
228230 wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
229231 xkbcommon = dontCheck super.xkbcommon;
230232 xmlgen = dontCheck super.xmlgen;
231− hapistrano = dontCheck super.hapistrano;
232233 HerbiePlugin = dontCheck super.HerbiePlugin;
233234 wai-cors = dontCheck super.wai-cors;
234235
@@ -278,7 +279,6 @@ self: super: {
278279 dotfs = dontCheck super.dotfs; # http://hydra.cryp.to/build/498599/log/raw
279280 DRBG = dontCheck super.DRBG; # http://hydra.cryp.to/build/498245/nixlog/1/raw
280281 ed25519 = dontCheck super.ed25519;
281− either-unwrap = dontCheck super.either-unwrap; # http://hydra.cryp.to/build/498782/log/raw
282282 etcd = dontCheck super.etcd;
283283 fb = dontCheck super.fb; # needs credentials for Facebook
284284 fptest = dontCheck super.fptest; # http://hydra.cryp.to/build/499124/log/raw
@@ -307,7 +307,6 @@ self: super: {
307307 hi = dontCheck super.hi;
308308 hierarchical-clustering = dontCheck super.hierarchical-clustering;
309309 hmatrix-tests = dontCheck super.hmatrix-tests;
310− hPDB-examples = dontCheck super.hPDB-examples;
311310 hquery = dontCheck super.hquery;
312311 hs2048 = dontCheck super.hs2048;
313312 hsbencher = dontCheck super.hsbencher;
@@ -427,9 +426,6 @@ self: super: {
427426 # https://github.com/NixOS/nixpkgs/issues/6350
428427 paypal-adaptive-hoops = overrideCabal super.paypal-adaptive-hoops (drv: { testTarget = "local"; });
429428
430− # https://github.com/afcowie/http-streams/issues/80
431− http-streams = dontCheck super.http-streams;
432−
433429 # https://github.com/vincenthz/hs-asn1/issues/12
434430 asn1-encoding = dontCheck super.asn1-encoding;
435431
@@ -451,9 +447,6 @@ self: super: {
451447 apiary-session = dontCheck super.apiary-session;
452448 apiary-websockets = dontCheck super.apiary-websockets;
453449
454− # https://github.com/alephcloud/hs-configuration-tools/issues/40
455− configuration-tools = dontCheck super.configuration-tools;
456−
457450 # HsColour: Language/Unlambda.hs: hGetContents: invalid argument (invalid byte sequence)
458451 unlambda = dontHyperlinkSource super.unlambda;
459452
@@ -695,13 +688,6 @@ self: super: {
695688 cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
696689 pango = disableHardening (addBuildTool super.pango self.gtk2hs-buildtools) ["fortify"];
697690
698− # Fix tests which would otherwise fail with "Couldn't launch intero process."
699− intero = overrideCabal super.intero (drv: {
700− postPatch = (drv.postPatch or "") + ''
701− substituteInPlace src/test/Main.hs --replace "\"intero\"" "\"$PWD/dist/build/intero/intero\""
702− '';
703− });
704−
705691 # https://github.com/commercialhaskell/stack/issues/3001
706692 stack = doJailbreak super.stack;
707693
@@ -736,14 +722,7 @@ self: super: {
736722 });
737723
738724 # test suite cannot find its own "idris" binary
739− idris = overrideCabal super.idris (drv: {
740− # "idris" binary cannot find Idris library otherwise while building. After
741− # installing it's completely fine though. This seems like a bug in Idris
742− # that's related to builds with shared libraries enabled. It would be great
743− # if someone who knows a thing or two about Idris could look into this.
744− preBuild = "export LD_LIBRARY_PATH=$PWD/dist/build:$LD_LIBRARY_PATH";
745− doCheck = false;
746− });
725+ idris = dontCheck super.idris;
747726
748727 # https://github.com/bos/math-functions/issues/25
749728 math-functions = dontCheck super.math-functions;
pkgs/development/haskell-modules/configuration-nix.nix+58−2
@@ -167,6 +167,13 @@ self: super: builtins.intersectAttrs super {
167167 http-client-tls = dontCheck super.http-client-tls;
168168 http-conduit = dontCheck super.http-conduit;
169169 transient-universe = dontCheck super.transient-universe;
170+ typed-process = dontCheck super.typed-process;
171+ js-jquery = dontCheck super.js-jquery;
172+ hPDB-examples = dontCheck super.hPDB-examples;
173+ configuration-tools = dontCheck super.configuration-tools; # https://github.com/alephcloud/hs-configuration-tools/issues/40
174+ tcp-streams = dontCheck super.tcp-streams;
175+ holy-project = dontCheck super.holy-project;
176+ mustache = dontCheck super.mustache;
170177
171178 # Tries to mess with extended POSIX attributes, but can't in our chroot environment.
172179 xattr = dontCheck super.xattr;
@@ -378,13 +385,62 @@ self: super: builtins.intersectAttrs super {
378385 idris = overrideCabal super.idris (drv: {
379386 # https://github.com/idris-lang/Idris-dev/issues/2499
380387 librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.gmp];
388+
389+ # tests and build run executable, so need to set LD_LIBRARY_PATH
390+ preBuild = ''
391+ export LD_LIBRARY_PATH="$PWD/dist/build:$LD_LIBRARY_PATH"
392+ '';
381393 });
382394
383395 libsystemd-journal = overrideCabal super.libsystemd-journal (old: {
384396 librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
385397 });
386398
387− # Needs network in tests.
388− typed-process = dontCheck super.typed-process;
399+ # does not specify tests in cabal file, instead has custom runTest cabal hook,
400+ # so cabal2nix will not detect test dependencies.
401+ either-unwrap = overrideCabal super.either-unwrap (drv: {
402+ testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
403+ });
404+
405+ hidapi = addExtraLibrary super.hidapi pkgs.libudev;
406+
407+ hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; };
408+
409+ discount = super.discount.override { markdown = pkgs.discount; };
410+
411+ # tests require working stack installation with all-cabal-hashes cloned in $HOME
412+ stackage-curator = dontCheck super.stackage-curator;
413+
414+ # hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
415+ io-streams = enableCabalFlag super.io-streams "NoInteractiveTests";
389416
417+ # requires autotools to build
418+ secp256k1 = addBuildTools super.secp256k1 [ pkgs.autoconf pkgs.automake pkgs.libtool ];
419+
420+ # tests require git
421+ hapistrano = addBuildTool super.hapistrano pkgs.git;
422+
423+ # requires webkitgtk API version 3 (webkitgtk 2.4 is the latest webkit supporting that version)
424+ gi-javascriptcore = super.gi-javascriptcore.override { webkitgtk = pkgs.webkitgtk24x; };
425+ gi-webkit = super.gi-webkit.override { webkit = pkgs.webkitgtk24x; };
426+
427+ # requires valid, writeable $HOME
428+ hatex-guide = overrideCabal super.hatex-guide (drv: {
429+ preConfigure = ''
430+ ${drv.preConfigure or ""}
431+ export HOME=$PWD
432+ '';
433+ });
434+
435+ # Fails to link against with newer gsl versions because a deprecrated function
436+ # was removed
437+ hmatrix-gsl = super.hmatrix-gsl.override { gsl = pkgs.gsl_1; };
438+
439+ # tests run executable, relying on PATH
440+ # without this, tests fail with "Couldn't launch intero process"
441+ intero = overrideCabal super.intero (drv: {
442+ preCheck = ''
443+ export PATH="$PWD/dist/build/intero:$PATH"
444+ '';
445+ });
390446}