From 26a7e0784fe985c4faf4f2bee0a6a621b52c2fe9 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 30 Sep 2016 21:15:25 +0200
Subject: [PATCH] haskell-stack: fix build of the new version

---
 .../haskell-modules/configuration-common.nix         | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 02c7b40485b..7504c40626a 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -971,11 +971,17 @@ self: super: {
   });
 
   # https://github.com/commercialhaskell/stack/issues/2263
-  stack = appendPatch super.stack (pkgs.fetchpatch {
-    url = "https://github.com/commercialhaskell/stack/commit/7f7f1a5f67f4ecdd1f3009495f1ff101dd38047e.patch";
-    sha256 = "1yh2g45mkfpwxq0vyzcbc4nbxh6wmb2xpp0k7r5byd8jicgvli29";
+  stack = (dontJailbreak super.stack).overrideScope (self: super: {
+    http-client = self.http-client_0_5_3_2;
+    http-client-tls = self.http-client-tls_0_3_3;
+    http-conduit = self.http-conduit_2_2_2_1;
+    optparse-applicative = dontCheck self.optparse-applicative_0_13_0_0;
+    criterion = super.criterion.override { inherit (super) optparse-applicative; };
   });
 
+  # Test suite fails a QuickCheck property.
+  optparse-applicative_0_13_0_0 = dontCheck super.optparse-applicative_0_13_0_0;
+
   # GLUT uses `dlopen` to link to freeglut, so we need to set the RUNPATH correctly for
   # it to find `libglut.so` from the nix store. We do this by patching GLUT.cabal to pkg-config
   # depend on freeglut, which provides GHC to necessary information to generate a correct RPATH.