diff options
author | Alex Vong <alexvong1995@gmail.com> | 2018-09-02 07:47:05 +0800 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-02 17:06:43 +0200 |
commit | 2bd6ed9e4c32928312eee9cd71137d5adf09f955 (patch) | |
tree | 6f8733985b7c5d7a66692ab56c5a948ea8fccda4 /gnu/packages/emacs.scm | |
parent | b21a55a9f218c32cf9df561ad0e8d10d1b596cf0 (diff) | |
download | guix-2bd6ed9e4c32928312eee9cd71137d5adf09f955.tar.gz |
gnu: haskell-mode: Fix test failure.
Fixes <https://bugs.gnu.org/31726>. Thanks to Jack Hill <jackhill@jackhill.us> for exploring different solutions at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31726>. * gnu/packages/patches/haskell-mode-unused-variables.patch, gnu/packages/patches/haskell-mode-make-check.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/emacs.scm (haskell-mode)[source]: Use them. [arguments]: Adjust 'pre-build' phase to embed file name. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/emacs.scm')
-rw-r--r-- | gnu/packages/emacs.scm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 2b8796f72e..08554280c7 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -646,7 +646,11 @@ only a handful of functions that are not resource-specific.") "https://github.com/haskell/haskell-mode/archive/v" version ".tar.gz")) (sha256 - (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009m78h")))) + (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009m78h")) + (patches + (search-patches ; backport test failure fixes + "haskell-mode-unused-variables.patch" + "haskell-mode-make-check.patch")))) (inputs `(("emacs-el-search" ,emacs-el-search) ; for tests ("emacs-stream" ,emacs-stream))) ; for tests @@ -686,12 +690,11 @@ only a handful of functions that are not resource-specific.") (_ "")) inputs))) (substitute* (find-files "." "\\.el") (("/bin/sh") sh)) - (substitute* "tests/haskell-code-conventions.el" - ;; Function name recently changed in "emacs-el-search". - (("el-search--search-pattern") "el-search-forward") - ;; Don't contact home. - (("\\(when \\(>= emacs-major-version 25\\)") - "(require 'el-search) (when nil")) + ;; embed filename to fix test failure + (let ((file "tests/haskell-cabal-tests.el")) + (substitute* file + (("\\(buffer-file-name\\)") + (format #f "(or (buffer-file-name) ~s)" file)))) #t))) (replace 'install |