From: Taiju HIGASHI <higashi@taiju.info>
To: 55495@debbugs.gnu.org
Cc: Taiju HIGASHI <higashi@taiju.info>
Subject: bug#55495: [PATCH v3] gnu: emacs-haskell-mode: Fix build.
Date: Thu, 2 Jun 2022 12:57:22 +0900 [thread overview]
Message-ID: <20220602035722.18022-1-higashi@taiju.info> (raw)
In-Reply-To: <87o7zvtf8z.fsf@taiju.info>
* gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Fix build.
---
gnu/packages/emacs-xyz.scm | 179 +++++++++++++++++++------------------
1 file changed, 94 insertions(+), 85 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ced6e1a482..3552cdc7c3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1571,92 +1571,101 @@ (define-public emacs-unpackaged-el
(license license:gpl3+))))
(define-public emacs-haskell-mode
- (package
- (name "emacs-haskell-mode")
- (version "17.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/haskell/haskell-mode")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0zxbacqzr84krmhqpvzndnvlcjh1gs1x20ys0dykgd7chyhci5j5"))))
- (propagated-inputs
- (list emacs-dash))
- (native-inputs
- (list emacs-minimal emacs-el-search emacs-stream texinfo))
- (build-system gnu-build-system)
- (arguments
- (list
- #:make-flags #~(list
- (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
- #:modules `((ice-9 match)
- (srfi srfi-26)
- ((guix build emacs-build-system) #:prefix emacs:)
- ,@%gnu-build-system-modules)
- #:imported-modules `(,@%gnu-build-system-modules
- (guix build emacs-build-system)
- (guix build emacs-utils))
- #:phases
- #~(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'pre-build
- (lambda* (#:key inputs #:allow-other-keys)
- (define (el-dir store-dir)
- (match (find-files store-dir "\\.el$")
- ((f1 f2 ...) (dirname f1))
- (_ "")))
-
- (let ((sh (search-input-file inputs "/bin/sh")))
- (define emacs-prefix? (cut string-prefix? "emacs-" <>))
-
- (setenv "SHELL" "sh")
- (setenv "EMACSLOADPATH"
- (string-concatenate
- (map (match-lambda
- (((? emacs-prefix? name) . dir)
- (string-append (el-dir dir) ":"))
- (_ ""))
- inputs)))
- (substitute* (find-files "." "\\.el") (("/bin/sh") sh)))))
- (add-before 'check 'delete-failing-tests
- ;; XXX: these tests require GHC executable, which would be a big
- ;; native input.
- (lambda _
- (with-directory-excursion "tests"
- ;; File `haskell-indent-tests.el' fails with
- ;; `haskell-indent-put-region-in-literate-2'
- ;; on Emacs 27.1+
- ;; XXX: https://github.com/haskell/haskell-mode/issues/1714
- (for-each delete-file
- '("haskell-indent-tests.el"
- "haskell-customize-tests.el"
- "inferior-haskell-tests.el")))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (el-dir (emacs:elpa-directory out))
- (doc (string-append
- out "/share/doc/haskell-mode-" #$version))
- (info (string-append out "/share/info")))
- (define (copy-to-dir dir files)
- (for-each (lambda (f)
- (install-file f dir))
- files))
-
- (with-directory-excursion "doc"
- (invoke "makeinfo" "haskell-mode.texi")
- (install-file "haskell-mode.info" info))
- (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
- (copy-to-dir el-dir (find-files "." "\\.elc?"))))))))
- (home-page "https://github.com/haskell/haskell-mode")
- (synopsis "Haskell mode for Emacs")
- (description
- "This is an Emacs mode for editing, debugging and developing Haskell
+ (let ((commit "5a9f8072c7b9168f0a8409adf9d62a3e4ad4ea3d")
+ (revision "0"))
+ (package
+ (name "emacs-haskell-mode")
+ (version (git-version "17.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/haskell/haskell-mode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0np1wrwdq7b9hpqpl9liampacnkx6diphyk8h2sbz2mfn9qr7pxs"))))
+ (propagated-inputs
+ (list emacs-dash))
+ (native-inputs
+ (list emacs-minimal emacs-el-search emacs-stream texinfo))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list
+ (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
+ #:modules `((ice-9 match)
+ (srfi srfi-26)
+ ((guix build emacs-build-system) #:prefix emacs:)
+ ,@%gnu-build-system-modules)
+ #:imported-modules `(,@%gnu-build-system-modules
+ (guix build emacs-build-system)
+ (guix build emacs-utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ ;; 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)
+ (define (el-dir store-dir)
+ (match (find-files store-dir "\\.el$")
+ ((f1 f2 ...) (dirname f1))
+ (_ "")))
+
+ (let ((sh (search-input-file inputs "/bin/sh")))
+ (define emacs-prefix? (cut string-prefix? "emacs-" <>))
+
+ (setenv "SHELL" "sh")
+ (setenv "EMACSLOADPATH"
+ (string-concatenate
+ (map (match-lambda
+ (((? emacs-prefix? name) . dir)
+ (string-append (el-dir dir) ":"))
+ (_ ""))
+ inputs)))
+ (substitute* (find-files "." "\\.el") (("/bin/sh") sh)))))
+ (add-before 'check 'delete-failing-tests
+ ;; XXX: these tests require GHC executable, which would be a big
+ ;; native input.
+ (lambda _
+ (with-directory-excursion "tests"
+ ;; File `haskell-indent-tests.el' fails with
+ ;; `haskell-indent-put-region-in-literate-2'
+ ;; on Emacs 27.1+
+ ;; XXX: https://github.com/haskell/haskell-mode/issues/1714
+ (for-each delete-file
+ '("haskell-indent-tests.el"
+ "haskell-customize-tests.el"
+ "inferior-haskell-tests.el")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (el-dir (emacs:elpa-directory out))
+ (doc (string-append
+ out "/share/doc/haskell-mode-" #$version))
+ (info (string-append out "/share/info")))
+ (define (copy-to-dir dir files)
+ (for-each (lambda (f)
+ (install-file f dir))
+ files))
+
+ (with-directory-excursion "doc"
+ (invoke "makeinfo" "haskell-mode.texi")
+ (install-file "haskell-mode.info" info))
+ (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
+ (copy-to-dir el-dir (find-files "." "\\.elc?"))))))))
+ (home-page "https://github.com/haskell/haskell-mode")
+ (synopsis "Haskell mode for Emacs")
+ (description
+ "This is an Emacs mode for editing, debugging and developing Haskell
programs.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-dante
(let ((commit "38b589417294c7ea44bf65b73b8046d950f9531b")
--
2.36.1
next prev parent reply other threads:[~2022-06-02 3:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 8:30 bug#55495: emacs-haskell-mode build fails Taiju HIGASHI
2022-05-18 13:16 ` Liliana Marie Prikler
2022-05-18 14:39 ` Taiju HIGASHI
2022-05-18 14:31 ` bug#55495: [PATCH] gnu: emacs-haskell-mode: Fix build Taiju HIGASHI
2022-05-19 19:09 ` Liliana Marie Prikler
2022-05-20 2:29 ` Taiju HIGASHI
2022-05-20 8:49 ` Taiju HIGASHI
2022-05-19 15:14 ` bug#55495: Re: emacs-haskell-mode build fails Luis Henrique Gomes Higino
2022-05-20 9:49 ` Taiju HIGASHI
2022-05-20 9:54 ` bug#55495: [PATCH] gnu: emacs-haskell-mode: Fix build Taiju HIGASHI
2022-05-20 20:59 ` Taiju HIGASHI
2022-05-20 21:57 ` Liliana Marie Prikler
2022-05-20 22:52 ` Taiju HIGASHI
2022-05-20 9:59 ` bug#55495: [PATCH v2] " Taiju HIGASHI
2022-05-21 5:23 ` bug#55495: [PATCH v3] " Taiju HIGASHI
2022-05-31 19:29 ` bug#55495: (no subject) Luis Henrique Gomes Higino
2022-06-01 3:52 ` Taiju HIGASHI
2022-06-01 14:56 ` Luis Henrique Gomes Higino
2022-06-01 15:36 ` Taiju HIGASHI
2022-06-02 3:57 ` Taiju HIGASHI [this message]
2022-06-02 4:01 ` bug#55495: [PATCH v3] gnu: emacs-haskell-mode: Fix build Taiju HIGASHI
2022-06-17 21:41 ` bug#55495: About v3 Luis Henrique Gomes Higino
2022-06-18 14:09 ` Taiju HIGASHI
2022-06-22 0:33 ` bug#55495: resolved by bug#56120 Taiju HIGASHI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220602035722.18022-1-higashi@taiju.info \
--to=higashi@taiju.info \
--cc=55495@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).