diff options
author | Federico Beffa <beffa@fbengineering.ch> | 2015-06-12 18:58:35 +0200 |
---|---|---|
committer | Federico Beffa <beffa@fbengineering.ch> | 2015-06-15 15:18:11 +0200 |
commit | 00f4bd509fd7c7bf83b803f36293824bd26ff28f (patch) | |
tree | 133988c4ef48a093b154863feec01926563b36b3 | |
parent | be0a4c261e9f04bed9b3f7b23e5fa827ae53cfde (diff) | |
download | guix-00f4bd509fd7c7bf83b803f36293824bd26ff28f.tar guix-00f4bd509fd7c7bf83b803f36293824bd26ff28f.tar.gz |
gnu: Add haskell-mode.
* gnu/packages/emacs.scm (haskell-mode): New variable.
-rw-r--r-- | gnu/packages/emacs.scm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 0f71c77bf2..2502f2935d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -428,6 +428,70 @@ operations.") support for Git-SVN.") (license license:gpl3+))) +(define-public haskell-mode + (package + (name "haskell-mode") + (version "13.14.2") + (source (origin + (method url-fetch) + (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append + "https://github.com/haskell/haskell-mode/archive/v" + version ".tar.gz")) + (sha256 + (base32 "1kxc2yj8vb122dv91r68h7c5ladcryx963fr16plfhg71fv7f9av")))) + (inputs `(("emacs" ,emacs-no-x))) + (native-inputs + `(("texinfo" ,texinfo))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "EMACS=" + (assoc-ref %build-inputs "emacs") + "/bin/emacs")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'pre-build + (lambda* (#:key inputs #:allow-other-keys) + (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh"))) + (setenv "SHELL" "sh") + (substitute* (find-files "." "\\.el") (("/bin/sh") sh)) + #t))) + (replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (el-dir (string-append out "/share/emacs/site-lisp")) + (doc (string-append + out "/share/doc/haskell-mode-" ,version)) + (info (string-append out "/share/info"))) + (define (copy-to-dir dir files) + (mkdir-p dir) + (for-each + (lambda (f) + (copy-file f (string-append dir "/" (basename f)))) + files)) + + (with-directory-excursion "doc" + (unless (zero? (system* "makeinfo" "haskell-mode.texi")) + (error "makeinfo failed")) + (mkdir-p info) + (copy-file "haskell-mode.info" + (string-append info "/haskell-mode.info"))) + (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) + (copy-to-dir el-dir (find-files "." "\\.elc?")) + ;; these are now distributed with emacs + (with-directory-excursion el-dir + (for-each delete-file '("cl-lib.el" "ert.el"))) + #t)))))) + (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+))) + ;;; ;;; Web browsing. |