Subject: bug#55495: [PATCH v3] gnu: emacs-haskell-mode: Fix build.

From: Taiju HIGASHI <[email-masked]>
Date: Sat, 21 May 2022 14:23:23 +0900

* gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Fix build.
---
 gnu/packages/emacs-xyz.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ae81f4e395..7af083da02 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1594,6 +1594,16 @@ (define-public emacs-haskell-mode
                            (guix build emacs-utils))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-build-and-tests
+            (lambda _
+              ;; This causes the byte-compilation before unit-tests to fail.
+              (substitute* "Makefile"
+                 (("--eval '\\(setq byte-compile-error-on-warn t\\)'") ""))
+              ;; Suppresses problems with git commands being called and tests
+              ;; failing.
+              (substitute* "tests/haskell-mode-tests.el"
+                (("\\(require 'haskell-test-utils\\)" all)
+                 (string-append all " (setq vc-handled-backends nil)")))))
           (delete 'configure)
           (add-before 'build 'pre-build
             (lambda* (#:key inputs #:allow-other-keys)
-- 
2.36.0