summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenno Fünfstück <benno.fuenfstueck@gmail.com>2017-02-19 11:34:21 +0100
committerBenno Fünfstück <benno.fuenfstueck@gmail.com>2017-02-19 11:34:21 +0100
commit785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0 (patch)
tree109c15034c6173145dcc1abe83a5795b0b28e7b1
parent16fd03ddaad480cf13cb5c55edeb74ce739bfdab (diff)
downloadnixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar.gz
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar.bz2
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar.lz
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar.xz
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.tar.zst
nixpkgs-785fbfac65b66ff4cef32525c7a6cb2b1c9e58c0.zip
haskell: add nix-specific fixes for various packages in stackage"
This reverts commit fd0e0cdc761d1edb0f02b0f5d2d04f557d06711b.

http-streams test suite is no longer broken, but still needs to be
disabled due to cyclic dependencies (http-streams(test) -> snap ->
http-streams)
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix28
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix60
2 files changed, 62 insertions, 26 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index a2b4c375212..48fb3e172ac 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -41,6 +41,9 @@ self: super: {
   nanospec = dontCheck super.nanospec;
   options = dontCheck super.options;
   statistics = dontCheck super.statistics;
+  http-streams = dontCheck super.http-streams;
+
+  # segfault due to missing return: https://github.com/haskell/c2hs/pull/184
   c2hs = dontCheck super.c2hs;
 
   # This test keeps being aborted because it runs too quietly for too long
@@ -228,7 +231,6 @@ self: super: {
   wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
   xkbcommon = dontCheck super.xkbcommon;
   xmlgen = dontCheck super.xmlgen;
-  hapistrano = dontCheck super.hapistrano;
   HerbiePlugin = dontCheck super.HerbiePlugin;
   wai-cors = dontCheck super.wai-cors;
 
@@ -278,7 +280,6 @@ self: super: {
   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
   ed25519 = dontCheck super.ed25519;
-  either-unwrap = dontCheck super.either-unwrap;        # http://hydra.cryp.to/build/498782/log/raw
   etcd = dontCheck super.etcd;
   fb = dontCheck super.fb;                              # needs credentials for Facebook
   fptest = dontCheck super.fptest;                      # http://hydra.cryp.to/build/499124/log/raw
@@ -307,7 +308,6 @@ self: super: {
   hi = dontCheck super.hi;
   hierarchical-clustering = dontCheck super.hierarchical-clustering;
   hmatrix-tests = dontCheck super.hmatrix-tests;
-  hPDB-examples = dontCheck super.hPDB-examples;
   hquery = dontCheck super.hquery;
   hs2048 = dontCheck super.hs2048;
   hsbencher = dontCheck super.hsbencher;
@@ -427,9 +427,6 @@ self: super: {
   # https://github.com/NixOS/nixpkgs/issues/6350
   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
   asn1-encoding = dontCheck super.asn1-encoding;
 
@@ -451,9 +448,6 @@ self: super: {
   apiary-session = dontCheck super.apiary-session;
   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)
   unlambda = dontHyperlinkSource super.unlambda;
 
@@ -695,13 +689,6 @@ self: super: {
   cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
   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
   stack = doJailbreak super.stack;
 
@@ -736,14 +723,7 @@ self: super: {
   });
 
   # test suite cannot find its own "idris" binary
-  idris = overrideCabal super.idris (drv: {
-    # "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;
-  });
+  idris = dontCheck super.idris;
 
   # https://github.com/bos/math-functions/issues/25
   math-functions = dontCheck super.math-functions;
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index bd74e0e6e04..c62d2702b44 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -167,6 +167,13 @@ self: super: builtins.intersectAttrs super {
   http-client-tls = dontCheck super.http-client-tls;
   http-conduit = dontCheck super.http-conduit;
   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.
   xattr = dontCheck super.xattr;
@@ -378,13 +385,62 @@ self: super: builtins.intersectAttrs super {
   idris = overrideCabal super.idris (drv: {
     # https://github.com/idris-lang/Idris-dev/issues/2499
     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: {
     librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
   });
 
-  # Needs network in tests.
-  typed-process = dontCheck super.typed-process;
+  # does not specify tests in cabal file, instead has custom runTest cabal hook,
+  # 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"
+    '';
+  });
 }