Subject: [bug#32908] [PATCH 02/24] gnu: ghc-regex: Fix build.

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 2 Oct 2018 18:28:50 +0200

* gnu/packages/haskell.scm (ghc-regex)[arguments]: Add build phase to relax
version checks.
---
 gnu/packages/haskell.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index a140985eb..c8e4523eb 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -3003,6 +3003,17 @@ Haskell library @code{regex-base}.")
         (base32
          "1sjkpkgv4phy5b5v2lr89x4vx4dh44pj0sbvlsp6n86w9v6v4jwb"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'relax-dependencies
+           (lambda _
+             (substitute* "regex.cabal"
+               (("base-compat.*>=.*0.6.*")
+                "base-compat >= 0.6\n")
+               (("template-haskell.*>=.*2.7.*")
+                "template-haskell >= 2.7\n"))
+             #t)))))
     (inputs
      `(("ghc-base-compat" ,ghc-base-compat)
        ("ghc-hashable" ,ghc-hashable)
-- 
2.19.0