Archived
1
0
Fork 0

gnu: emacs-haskell-mode: Update to 17.4.

* gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Update to 17.4.
This commit is contained in:
Nicolas Goaziou 2023-09-02 22:59:19 +02:00
parent 14af4efae8
commit caf018db5f
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -2288,99 +2288,97 @@ replacement.")
(license license:gpl3+)))) (license license:gpl3+))))
(define-public emacs-haskell-mode (define-public emacs-haskell-mode
(let ((revision "0") (package
(commit "5a9f8072c7b9168f0a8409adf9d62a3e4ad4ea3d")) (name "emacs-haskell-mode")
(package (version "17.4")
(name "emacs-haskell-mode") (source
(version (git-version "17.2" revision commit)) (origin
(source (method git-fetch)
(origin (uri (git-reference
(method git-fetch) (url "https://github.com/haskell/haskell-mode")
(uri (git-reference (commit (string-append "v" version))))
(url "https://github.com/haskell/haskell-mode") (file-name (git-file-name name version))
(commit commit))) (sha256
(file-name (git-file-name name version)) (base32 "03j94fgw1bljbjqmikbn9mnrfifxf7g9zrb727zmnnrjwyi0wd4n"))))
(sha256 (propagated-inputs
(base32 "0np1wrwdq7b9hpqpl9liampacnkx6diphyk8h2sbz2mfn9qr7pxs")))) (list emacs-dash))
(propagated-inputs (native-inputs
(list emacs-dash)) (list emacs-minimal emacs-el-search emacs-stream texinfo))
(native-inputs (build-system gnu-build-system)
(list emacs-minimal emacs-el-search emacs-stream texinfo)) (arguments
(build-system gnu-build-system) (list
(arguments #:make-flags #~(list
(list (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
#:make-flags #~(list #:modules `((ice-9 match)
(string-append "EMACS=" #$emacs-minimal "/bin/emacs")) (srfi srfi-26)
#:modules `((ice-9 match) ((guix build emacs-build-system) #:prefix emacs:)
(srfi srfi-26) ,@%gnu-build-system-modules)
((guix build emacs-build-system) #:prefix emacs:) #:imported-modules `(,@%gnu-build-system-modules
,@%gnu-build-system-modules) (guix build emacs-build-system)
#:imported-modules `(,@%gnu-build-system-modules (guix build emacs-utils))
(guix build emacs-build-system) #:phases
(guix build emacs-utils)) #~(modify-phases %standard-phases
#:phases (delete 'configure)
#~(modify-phases %standard-phases (add-before 'build 'pre-build
(delete 'configure) (lambda* (#:key inputs #:allow-other-keys)
(add-before 'build 'pre-build (define (el-dir store-dir)
(lambda* (#:key inputs #:allow-other-keys) (match (find-files store-dir "\\.el$")
(define (el-dir store-dir) ((f1 f2 ...) (dirname f1))
(match (find-files store-dir "\\.el$") (_ "")))
((f1 f2 ...) (dirname f1))
(_ "")))
(let ((sh (search-input-file inputs "/bin/sh"))) (let ((sh (search-input-file inputs "/bin/sh")))
(define emacs-prefix? (cut string-prefix? "emacs-" <>)) (define emacs-prefix? (cut string-prefix? "emacs-" <>))
(setenv "SHELL" "sh") (setenv "SHELL" "sh")
(setenv "EMACSLOADPATH" (setenv "EMACSLOADPATH"
(string-concatenate (string-concatenate
(map (match-lambda (map (match-lambda
(((? emacs-prefix? name) . dir) (((? emacs-prefix? name) . dir)
(string-append (el-dir dir) ":")) (string-append (el-dir dir) ":"))
(_ "")) (_ ""))
inputs))) inputs)))
(substitute* (find-files "." "\\.el") (("/bin/sh") sh))))) (substitute* (find-files "." "\\.el") (("/bin/sh") sh)))))
(add-before 'check 'delete-failing-tests (add-before 'check 'delete-failing-tests
;; XXX: these tests require GHC executable, which would be a big ;; XXX: these tests require GHC executable, which would be a big
;; native input. ;; native input.
(lambda _ (lambda _
(with-directory-excursion "tests" (with-directory-excursion "tests"
;; File `haskell-indent-tests.el' fails with ;; File `haskell-indent-tests.el' fails with
;; `haskell-indent-put-region-in-literate-2' ;; `haskell-indent-put-region-in-literate-2'
;; on Emacs 27.1+ ;; on Emacs 27.1+
;; XXX: https://github.com/haskell/haskell-mode/issues/1714 ;; XXX: https://github.com/haskell/haskell-mode/issues/1714
(for-each delete-file (for-each delete-file
'("haskell-indent-tests.el" '("haskell-indent-tests.el"
"haskell-customize-tests.el" "haskell-customize-tests.el"
"inferior-haskell-tests.el")) "inferior-haskell-tests.el"))
;; requires many external tools (e.g. git, hasktags) ;; requires many external tools (e.g. git, hasktags)
(substitute* "haskell-mode-tests.el" (substitute* "haskell-mode-tests.el"
(("\\(ert-deftest haskell-generate-tags.*" all) (("\\(ert-deftest haskell-generate-tags.*" all)
(string-append all " (skip-unless nil)")))))) (string-append all " (skip-unless nil)"))))))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(el-dir (emacs:elpa-directory out)) (el-dir (emacs:elpa-directory out))
(doc (string-append (doc (string-append
out "/share/doc/haskell-mode-" #$version)) out "/share/doc/haskell-mode-" #$version))
(info (string-append out "/share/info"))) (info (string-append out "/share/info")))
(define (copy-to-dir dir files) (define (copy-to-dir dir files)
(for-each (lambda (f) (for-each (lambda (f)
(install-file f dir)) (install-file f dir))
files)) files))
(with-directory-excursion "doc" (with-directory-excursion "doc"
(invoke "makeinfo" "haskell-mode.texi") (invoke "makeinfo" "haskell-mode.texi")
(install-file "haskell-mode.info" info)) (install-file "haskell-mode.info" info))
(copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
(copy-to-dir el-dir (find-files "." "\\.elc?")))))))) (copy-to-dir el-dir (find-files "." "\\.elc?"))))))))
(home-page "https://github.com/haskell/haskell-mode") (home-page "https://github.com/haskell/haskell-mode")
(synopsis "Haskell mode for Emacs") (synopsis "Haskell mode for Emacs")
(description (description
"This is an Emacs mode for editing, debugging and developing Haskell "This is an Emacs mode for editing, debugging and developing Haskell
programs.") programs.")
(license license:gpl3+)))) (license license:gpl3+)))
(define-public emacs-dante (define-public emacs-dante
(package (package