summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-06-04 22:29:22 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-07-02 15:52:21 -0400
commit43e3ea03228c4fa7ada8736fad4deb3eb66724dc (patch)
treedbe15ec50adb01aa2a538a7151e2687f523cd582 /pkgs/development/haskell-modules
parentceaf285c0c4debf8a932fd8d4d281fba100ef3f5 (diff)
downloadnixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar.gz
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar.bz2
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar.lz
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar.xz
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.tar.zst
nixlib-43e3ea03228c4fa7ada8736fad4deb3eb66724dc.zip
hspec{,-core,-discovery}: Add build-tool-depends to testsuite
`fetchpatch`ing a PR I just opened. This ought to get Cabal to make the
`PATH` include the newly-built exe, but unfortunately it doesn't.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix35
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix4
2 files changed, 33 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 3be577549bdf..812711ddcb57 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -51,8 +51,6 @@ self: super: {
   clock = dontCheck super.clock;
   Dust-crypto = dontCheck super.Dust-crypto;
   hasql-postgres = dontCheck super.hasql-postgres;
-  hspec = super.hspec.override { stringbuilder = dontCheck self.stringbuilder; };
-  hspec-core = super.hspec-core.override { silently = dontCheck self.silently; temporary = dontCheck self.temporary; };
   hspec-expectations = dontCheck super.hspec-expectations;
   HTTP = dontCheck super.HTTP;
   http-streams = dontCheck super.http-streams;
@@ -1070,6 +1068,39 @@ self: super: {
     base-compat = super.base-compat_0_10_1;
   };
 
+  # A few things for hspec*:
+  #
+  #   1. Break cycles for test
+  #
+  #   2. https://github.com/hspec/hspec/pull/355 The buildTool will be properly
+  #      cabal2nixed when run on the patched cabal file.
+  #
+  #   3. Force 2.5.1 as only it has patch for proper build-tool-depends deps.
+  hspec_2_5_1 = let
+    breakCycles = super.hspec_2_5_1.override { stringbuilder = dontCheck self.stringbuilder; };
+  in appendPatch (addTestToolDepend breakCycles self.hspec-meta) (pkgs.fetchpatch {
+    url = "https://github.com/hspec/hspec/commit/8007227da5c8f2e294c1455a9f2c9855917dc461.diff";
+    includes = [ "hspec.cabal" ];
+    sha256 = "0qk7lsg7s1j42mf9zbh4ga1ca5qbh1qsnsidvlp4rjjifw6jq3vz";
+  });
+  hspec-core_2_5_1 = let
+    breakCycles = super.hspec-core_2_5_1.override { silently = dontCheck self.silently; temporary = dontCheck self.temporary; };
+  in appendPatch (addTestToolDepend breakCycles self.hspec-meta) (pkgs.fetchpatch {
+    url = "https://github.com/hspec/hspec/commit/8007227da5c8f2e294c1455a9f2c9855917dc461.diff";
+    includes = [ "hspec-core.cabal" ];
+    sha256 = "0rwlz24mqh67gpkcrnhm8js594783v4gikzmdwi148w0h6hw2435";
+    stripLen = 1;
+  });
+  hspec-discover_2_5_1 = appendPatch (addTestToolDepend super.hspec-discover_2_5_1 self.hspec-meta) (pkgs.fetchpatch {
+    url = "https://github.com/hspec/hspec/commit/8007227da5c8f2e294c1455a9f2c9855917dc461.diff";
+    includes = [ "hspec-discover.cabal" ];
+    sha256 = "1c343flwxaq7cpnwyjf4y1c5smqs5q90i48sda9kyhl88mslq63b";
+    stripLen = 1;
+  });
+  hspec = self.hspec_2_5_1;
+  hspec-core = self.hspec-core_2_5_1;
+  hspec-discover = self.hspec-discover_2_5_1;
+  hspec-smallcheck = self.hspec-smallcheck_0_5_2;
 }
 
 //
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
index 45b0d768a22f..bbef7b583d82 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
@@ -397,10 +397,6 @@ self: super: {
   dhall_1_13_0 = doJailbreak super.dhall_1_14_0;  # support ansi-terminal 0.8.x
   HaTeX = self.HaTeX_3_19_0_0;
   hpack = self.hpack_0_28_2;
-  hspec = dontCheck super.hspec_2_5_3;
-  hspec-core = dontCheck super.hspec-core_2_5_3;
-  hspec-discover = self.hspec-discover_2_5_3;
-  hspec-smallcheck = self.hspec-smallcheck_0_5_2;
   matrix = self.matrix_0_3_6_1;
   pandoc = self.pandoc_2_2_1;
   pandoc-types = self.pandoc-types_1_17_5_1;