From patchwork Tue Jun 21 08:22:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 40206 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4A1A027BBEA; Tue, 21 Jun 2022 09:24:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8C83F27BBE9 for ; Tue, 21 Jun 2022 09:24:11 +0100 (BST) Received: from localhost ([::1]:42946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3ZBC-0000Y0-Op for patchwork@mira.cbaines.net; Tue, 21 Jun 2022 04:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3ZB5-0000XM-52 for guix-patches@gnu.org; Tue, 21 Jun 2022 04:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3ZB4-0003kl-T5 for guix-patches@gnu.org; Tue, 21 Jun 2022 04:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3ZB4-0002l8-LY for guix-patches@gnu.org; Tue, 21 Jun 2022 04:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56120] [PATCH]: gnu: emacs-haskell-mode: Update to 17.2-0-5a9f807. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jun 2022 08:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56120 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56120@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165579982310577 (code B ref -1); Tue, 21 Jun 2022 08:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jun 2022 08:23:43 +0000 Received: from localhost ([127.0.0.1]:59079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3ZAk-0002kX-VZ for submit@debbugs.gnu.org; Tue, 21 Jun 2022 04:23:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:50440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3ZAi-0002kO-7O for submit@debbugs.gnu.org; Tue, 21 Jun 2022 04:23:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3ZAi-0000TT-1j for guix-patches@gnu.org; Tue, 21 Jun 2022 04:23:40 -0400 Received: from mail-m971.mail.163.com ([123.126.97.1]:24966) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3ZAc-0003iD-9f for guix-patches@gnu.org; Tue, 21 Jun 2022 04:23:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=oRmH8 lzbpHsLnb/iQNv8YEVIchSVER3+jvIEvo/ah2Q=; b=A2qM/YOB5Yd4p/IFzYd0v 4HeLrNRN82M5bRkwpY/zdJLspiNEte/G13QtRSAZ+TWXsHkmFmDMqJF/5E3zrBSZ scIYhrHI0BNjGxgxyILRSE42F9hmC1hIus2SepJOY9sachbluhdFgdiQSbaayzdb 65RdcFZldrgHblq1dK7Udo= Received: from asus-laptop (unknown [27.38.202.29]) by smtp1 (Coremail) with SMTP id GdxpCgA3QLEBgLFikaRAKQ--.3603S2; Tue, 21 Jun 2022 16:23:30 +0800 (CST) User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao Date: Tue, 21 Jun 2022 16:22:26 +0800 Message-ID: <86r13itog0.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: GdxpCgA3QLEBgLFikaRAKQ--.3603S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU8_-mDUUUU X-Originating-IP: [27.38.202.29] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBawInr1et5dIKdAAAsS Received-SPF: pass client-ip=123.126.97.1; envelope-from=all_but_last@163.com; helo=mail-m971.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This patch includes serveral bug fixes after the latest release and make emacs-haskell-mode compile on Emacs 28. From 3e94541016a374cfd04fd7edbf0e8540b0df8b61 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Tue, 21 Jun 2022 16:11:43 +0800 Subject: [PATCH] gnu: emacs-haskell-mode: Update to 17.2-0-5a9f807. * gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Update to 17.2-0-5a9f807. --- gnu/packages/emacs-xyz.scm | 171 +++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 82 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index d02e1dc7d5..c52a7bd092 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -1627,92 +1627,99 @@ (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 ((revision "0") + (commit "5a9f8072c7b9168f0a8409adf9d62a3e4ad4ea3d")) + (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 + (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-" <>)) + (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)) + (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")) - (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 + ;; requires many external tools (e.g. git, hasktags) + (substitute* "haskell-mode-tests.el" + (("\\(ert-deftest haskell-generate-tags.*" all) + (string-append all " (skip-unless nil)")))))) + (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