gnu: emacs-async: Update to 1.9.
[jackhill/guix/guix.git] / gnu / packages / emacs.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
9 ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
10 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
11 ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages emacs)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix gexp)
34 #:use-module (guix monads)
35 #:use-module (guix store)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system emacs)
38 #:use-module (guix build-system glib-or-gtk)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages texinfo)
46 #:use-module (gnu packages tls)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages xorg)
49 #:use-module (gnu packages lesstif)
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages version-control)
53 #:use-module (gnu packages imagemagick)
54 #:use-module (gnu packages w3m)
55 #:use-module (gnu packages wget)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages xml)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages acl)
62 #:use-module (gnu packages package-management)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pdf)
65 #:use-module (gnu packages scheme)
66 #:use-module (gnu packages xiph)
67 #:use-module (gnu packages mp3)
68 #:use-module (guix utils)
69 #:use-module (srfi srfi-1))
70
71 (define-public emacs
72 (package
73 (name "emacs")
74 (version "24.5")
75 (source (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnu/emacs/emacs-"
78 version ".tar.xz"))
79 (sha256
80 (base32
81 "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
82 (patches (search-patches "emacs-exec-path.patch"
83 "emacs-source-date-epoch.patch"))
84 (modules '((guix build utils)))
85 (snippet
86 ;; Delete the bundled byte-compiled elisp files and
87 ;; generated autoloads.
88 '(with-directory-excursion "lisp"
89 (for-each delete-file
90 (append (find-files "." "\\.elc$")
91 (find-files "." "loaddefs\\.el$")
92 ;; This is the only "autoloads" file that
93 ;; does not have "*loaddefs.el" name.
94 '("eshell/esh-groups.el")))))))
95 (build-system glib-or-gtk-build-system)
96 (arguments
97 `(#:phases
98 (modify-phases %standard-phases
99 (add-before 'configure 'fix-/bin/pwd
100 (lambda _
101 ;; Use `pwd', not `/bin/pwd'.
102 (substitute* (find-files "." "^Makefile\\.in$")
103 (("/bin/pwd")
104 "pwd"))))
105 (add-after 'install 'remove-info.info
106 (lambda* (#:key outputs #:allow-other-keys)
107 ;; Remove 'info.info', which is provided by Texinfo <= 6.0.
108 ;; TODO: Remove this phase when we switch to Texinfo 6.1.
109 (let ((out (assoc-ref outputs "out")))
110 (delete-file
111 (string-append out "/share/info/info.info.gz"))
112 #t)))
113 (add-after 'install 'install-site-start
114 ;; Copy guix-emacs.el from Guix and add it to site-start.el. This
115 ;; way, Emacs packages provided by Guix and installed in
116 ;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSION are
117 ;; automatically found.
118 (lambda* (#:key inputs outputs #:allow-other-keys)
119 (let* ((guix-src (assoc-ref inputs "guix-src"))
120 (out (assoc-ref outputs "out"))
121 (lisp-dir (string-append out "/share/emacs/"
122 ,(version-major+minor version)
123 "/site-lisp"))
124 (unpack (assoc-ref %standard-phases 'unpack)))
125 (mkdir "guix")
126 (with-directory-excursion "guix"
127 (apply unpack (list #:source guix-src))
128 (install-file "emacs/guix-emacs.el" lisp-dir))
129 (with-output-to-file (string-append lisp-dir "/site-start.el")
130 (lambda ()
131 (display "(require 'guix-emacs nil t)")))
132 #t))))))
133 (inputs
134 `(("gnutls" ,gnutls)
135 ("ncurses" ,ncurses)
136
137 ;; TODO: Add the optional dependencies.
138 ("libx11" ,libx11)
139 ("gtk+" ,gtk+)
140 ("libxft" ,libxft)
141 ("libtiff" ,libtiff)
142 ("giflib" ,giflib)
143 ("libjpeg" ,libjpeg-8)
144 ("acl" ,acl)
145
146 ;; When looking for libpng `configure' links with `-lpng -lz', so we
147 ;; must also provide zlib as an input.
148 ("libpng" ,libpng)
149 ("zlib" ,zlib)
150
151 ("librsvg" ,librsvg)
152 ("libxpm" ,libxpm)
153 ("libxml2" ,libxml2)
154 ("libice" ,libice)
155 ("libsm" ,libsm)
156 ("alsa-lib" ,alsa-lib)
157 ("dbus" ,dbus)
158 ("guix-src" ,(package-source guix))))
159 (native-inputs
160 `(("pkg-config" ,pkg-config)
161 ("texinfo" ,texinfo)))
162
163 (native-search-paths
164 (list (search-path-specification
165 (variable "INFOPATH")
166 (files '("share/info")))))
167
168 (home-page "http://www.gnu.org/software/emacs/")
169 (synopsis "The extensible, customizable, self-documenting text editor")
170 (description
171 "GNU Emacs is an extensible and highly customizable text editor. It is
172 based on an Emacs Lisp interpreter with extensions for text editing. Emacs
173 has been extended in essentially all areas of computing, giving rise to a
174 vast array of packages supporting, e.g., email, IRC and XMPP messaging,
175 spreadsheets, remote server editing, and much more. Emacs includes extensive
176 documentation on all aspects of the system, from basic editing to writing
177 large Lisp programs. It has full Unicode support for nearly all human
178 languages.")
179 (license license:gpl3+)))
180
181 (define-public emacs-minimal
182 ;; This is the version that you should use as an input to packages that just
183 ;; need to byte-compile .el files.
184 (package (inherit emacs)
185 (name "emacs-minimal")
186 (synopsis "The extensible text editor (used only for byte-compilation)")
187 (build-system gnu-build-system)
188 (arguments
189 (substitute-keyword-arguments (package-arguments emacs)
190 ((#:phases phases)
191 `(modify-phases ,phases
192 (delete 'install-site-start)))))
193 (inputs
194 `(("ncurses" ,ncurses)))
195 (native-inputs
196 `(("pkg-config" ,pkg-config)))))
197
198 (define-public emacs-no-x
199 (package (inherit emacs)
200 (name "emacs-no-x")
201 (synopsis "The extensible, customizable, self-documenting text
202 editor (console only)")
203 (build-system gnu-build-system)
204 (inputs (fold alist-delete
205 (package-inputs emacs)
206 '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg"
207 "libpng" "librsvg" "libxpm" "libice" "libsm"
208
209 ;; D-Bus depends on libx11, so remove it as well.
210 "dbus")))))
211
212 (define-public emacs-no-x-toolkit
213 (package (inherit emacs)
214 (name "emacs-no-x-toolkit")
215 (synopsis "The extensible, customizable, self-documenting text
216 editor (without an X toolkit)" )
217 (build-system gnu-build-system)
218 (inputs (append `(("inotify-tools" ,inotify-tools))
219 (alist-delete "gtk+" (package-inputs emacs))))
220 (arguments (append '(#:configure-flags '("--with-x-toolkit=no"))
221 (package-arguments emacs)))))
222
223 (define-public guile-emacs
224 (package (inherit emacs)
225 (name "guile-emacs")
226 (version "20150512.41120e0")
227 (source (origin
228 (method git-fetch)
229 (uri (git-reference
230 (url "git://git.hcoop.net/git/bpt/emacs.git")
231 (commit "41120e0f595b16387eebfbf731fff70481de1b4b")))
232 (sha256
233 (base32
234 "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6"))))
235 (native-inputs
236 `(("autoconf" ,autoconf)
237 ("automake" ,automake)
238 ("guile" ,guile-for-guile-emacs)
239 ,@(package-native-inputs emacs)))
240 (arguments
241 (substitute-keyword-arguments `(;; Build fails if we allow parallel build.
242 #:parallel-build? #f
243 ;; Tests aren't passing for now.
244 #:tests? #f
245 ,@(package-arguments emacs))
246 ((#:phases phases)
247 `(modify-phases ,phases
248 (add-after 'unpack 'autogen
249 (lambda _
250 (zero? (system* "sh" "autogen.sh"))))))))))
251
252 \f
253 ;;;
254 ;;; Emacs hacking.
255 ;;;
256
257 (define-public geiser
258 (package
259 (name "geiser")
260 (version "0.8.1")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "mirror://savannah/geiser/" version
264 "/geiser-" version ".tar.gz"))
265 (sha256
266 (base32
267 "163zh8qf1q8l485d94a51a9xixirj8r2xvrbgxyw06vkaqrz5qvc"))))
268 (build-system gnu-build-system)
269 (arguments
270 '(#:phases (alist-cons-after
271 'install 'post-install
272 (lambda* (#:key outputs #:allow-other-keys)
273 (symlink "geiser-install.el"
274 (string-append (assoc-ref outputs "out")
275 "/share/emacs/site-lisp/"
276 "geiser-autoloads.el")))
277 %standard-phases)))
278 (inputs `(("guile" ,guile-2.0)))
279 (native-inputs `(("emacs" ,emacs-minimal)))
280 (home-page "http://nongnu.org/geiser/")
281 (synopsis "Collection of Emacs modes for Guile and Racket hacking")
282 (description
283 "Geiser is a collection of Emacs major and minor modes that conspire with
284 one or more Scheme implementations to keep the Lisp Machine Spirit alive. The
285 continuously running Scheme interpreter takes the center of the stage in
286 Geiser. A bundle of Elisp shims orchestrates the dialog between the Scheme
287 implementation, Emacs and, ultimately, the schemer, giving them access to live
288 metadata.")
289 (license license:bsd-3)))
290
291 (define-public geiser-next
292 ;; Geiser's upcoming version supports guile-next, and 0.8.1 does not.
293 ;; When the next Geiser release comes out, we can remove this.
294 (let ((commit "2e335695fc1a4a0b520b50deb761b958194cbec4"))
295 (package
296 (inherit geiser)
297 (name "geiser-next")
298 (version (string-append "0.8.1-1"
299 (string-take commit 7)))
300 (source (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "git://git.sv.gnu.org/geiser.git")
304 (commit commit)))
305 (sha256
306 (base32
307 "00rmpn8zncq1fiah5m12l26z0s28bh7ql63kxdvksqdgfrisnmgf"))))
308 (native-inputs
309 `(("autoconf" ,autoconf)
310 ("automake" ,automake)
311 ("texinfo" ,texinfo)
312 ,@(package-native-inputs geiser)))
313 (arguments
314 (substitute-keyword-arguments (package-arguments geiser)
315 ((#:phases phases)
316 `(modify-phases ,phases
317 (add-after 'unpack 'autogen
318 (lambda _
319 (zero? (system* "sh" "autogen.sh")))))))))))
320
321 (define-public paredit
322 (package
323 (name "paredit")
324 (version "24")
325 (source (origin
326 (method url-fetch)
327 (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
328 version ".el"))
329 (sha256
330 (base32
331 "0pp3n8q6kc70blqsaw0zlzp6bc327dpgdrjr0cnh7hqg1lras7ka"))))
332 (build-system trivial-build-system)
333 (native-inputs `(("emacs" ,emacs-minimal)))
334 (arguments
335 `(#:modules ((guix build utils)
336 (guix build emacs-utils))
337 #:builder
338 (begin
339 (use-modules (guix build utils))
340 (use-modules (guix build emacs-utils))
341
342 (let* ((emacs (string-append (assoc-ref %build-inputs "emacs")
343 "/bin/emacs"))
344 (source (assoc-ref %build-inputs "source"))
345 (lisp-dir (string-append %output
346 "/share/emacs/site-lisp"))
347 (target (string-append lisp-dir "/paredit.el")))
348 (mkdir-p lisp-dir)
349 (copy-file source target)
350 (with-directory-excursion lisp-dir
351 (parameterize ((%emacs emacs))
352 (emacs-generate-autoloads ,name lisp-dir)
353 (emacs-batch-eval '(byte-compile-file "paredit.el"))))))))
354 (home-page "http://mumble.net/~campbell/emacs/paredit/")
355 (synopsis "Emacs minor mode for editing parentheses")
356 (description
357 "ParEdit (paredit.el) is a minor mode for performing structured editing
358 of S-expression data. The typical example of this would be Lisp or Scheme
359 source code.
360
361 ParEdit helps **keep parentheses balanced** and adds many keys for moving
362 S-expressions and moving around in S-expressions. Its behavior can be jarring
363 for those who may want transient periods of unbalanced parentheses, such as
364 when typing parentheses directly or commenting out code line by line.")
365 (license license:gpl3+)))
366
367 (define-public git-modes
368 (package
369 (name "git-modes")
370 (version "1.2.2")
371 (source (origin
372 (method url-fetch)
373 (uri (string-append
374 "https://github.com/magit/git-modes/archive/"
375 version ".tar.gz"))
376 (file-name (string-append name "-" version ".tar.gz"))
377 (sha256
378 (base32
379 "0gb9c18jib8rpm14vig9774104lwmd8353ps0259m861syf6664d"))))
380 (build-system gnu-build-system)
381 (arguments
382 `(#:modules ((guix build gnu-build-system)
383 (guix build emacs-utils)
384 (guix build utils))
385 #:imported-modules (,@%gnu-build-system-modules
386 (guix build emacs-utils))
387
388 #:make-flags (list (string-append "PREFIX="
389 (assoc-ref %outputs "out"))
390 ;; Don't put .el files in a 'git-modes'
391 ;; sub-directory.
392 (string-append "LISPDIR="
393 (assoc-ref %outputs "out")
394 "/share/emacs/site-lisp"))
395 #:tests? #f ; no check target
396 #:phases (modify-phases %standard-phases
397 (delete 'configure)
398 (add-after 'install 'emacs-autoloads
399 (lambda* (#:key outputs #:allow-other-keys)
400 (let* ((out (assoc-ref outputs "out"))
401 (lisp (string-append
402 out "/share/emacs/site-lisp/")))
403 (emacs-generate-autoloads ,name lisp)))))))
404 (native-inputs `(("emacs" ,emacs-minimal)))
405 (home-page "https://github.com/magit/git-modes")
406 (synopsis "Emacs major modes for Git configuration files")
407 (description
408 "This package provides Emacs major modes for editing various Git
409 configuration files, such as .gitattributes, .gitignore, and .git/config.")
410 (license license:gpl3+)))
411
412 (define-public emacs-with-editor
413 (package
414 (name "emacs-with-editor")
415 (version "2.5.1")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append
419 "https://github.com/magit/with-editor/archive/v"
420 version ".tar.gz"))
421 (file-name (string-append name "-" version ".tar.gz"))
422 (sha256
423 (base32
424 "1lqm0msc9lzb05ys96bsx8bf2y1qrw27dh5h6qz8lf5i4cbhflw2"))))
425 (build-system emacs-build-system)
426 (propagated-inputs
427 `(("emacs-dash" ,emacs-dash)))
428 (home-page "https://github.com/magit/with-editor")
429 (synopsis "Emacs library for using Emacsclient as EDITOR")
430 (description
431 "This package provides an Emacs library to use the Emacsclient as
432 @code{$EDITOR} of child processes, making sure they know how to call home.
433 For remote processes a substitute is provided, which communicates with Emacs
434 on stdout instead of using a socket as the Emacsclient does.")
435 (license license:gpl3+)))
436
437 (define-public magit
438 (package
439 (name "magit")
440 (version "2.7.0")
441 (source (origin
442 (method url-fetch)
443 (uri (string-append
444 "https://github.com/magit/magit/releases/download/"
445 version "/" name "-" version ".tar.gz"))
446 (sha256
447 (base32
448 "1kzd8k2n0lcr04jvn5b6d29zf765mxgshfhzflkzndwmvyxmlqpl"))))
449 (build-system gnu-build-system)
450 (native-inputs `(("texinfo" ,texinfo)
451 ("emacs" ,emacs-minimal)))
452 (inputs `(("git" ,git)))
453 (propagated-inputs
454 `(("dash" ,emacs-dash)
455 ("with-editor" ,emacs-with-editor)))
456 (arguments
457 `(#:modules ((guix build gnu-build-system)
458 (guix build utils)
459 (guix build emacs-utils))
460 #:imported-modules (,@%gnu-build-system-modules
461 (guix build emacs-utils))
462
463 #:test-target "test"
464 #:tests? #f ; tests are not included in the release
465
466 #:make-flags
467 (list (string-append "PREFIX=" %output)
468 ;; Don't put .el files in a sub-directory.
469 (string-append "lispdir=" %output "/share/emacs/site-lisp")
470 (string-append "DASH_DIR="
471 (assoc-ref %build-inputs "dash")
472 "/share/emacs/site-lisp/guix.d/dash-"
473 ,(package-version emacs-dash))
474 (string-append "WITH_EDITOR_DIR="
475 (assoc-ref %build-inputs "with-editor")
476 "/share/emacs/site-lisp/guix.d/with-editor-"
477 ,(package-version emacs-with-editor)))
478
479 #:phases
480 (modify-phases %standard-phases
481 (delete 'configure)
482 (add-before
483 'build 'patch-exec-paths
484 (lambda* (#:key inputs #:allow-other-keys)
485 (let ((git (assoc-ref inputs "git")))
486 (emacs-substitute-variables "lisp/magit-git.el"
487 ("magit-git-executable" (string-append git "/bin/git")))
488 #t))))))
489 (home-page "http://magit.github.io/")
490 (synopsis "Emacs interface for the Git version control system")
491 (description
492 "With Magit, you can inspect and modify your Git repositories with Emacs.
493 You can review and commit the changes you have made to the tracked files, for
494 example, and you can browse the history of past changes. There is support for
495 cherry picking, reverting, merging, rebasing, and other common Git
496 operations.")
497 (license license:gpl3+)))
498
499 (define-public magit-svn
500 (package
501 (name "magit-svn")
502 (version "2.1.1")
503 (source (origin
504 (method url-fetch)
505 (uri (string-append
506 "https://github.com/magit/magit-svn/archive/"
507 version ".tar.gz"))
508 (file-name (string-append name "-" version ".tar.gz"))
509 (sha256
510 (base32
511 "04y88j7q9h8xjbx5dbick6n5nr1522sn9i1znp0qwk3vjb4b5mzz"))))
512 (build-system trivial-build-system)
513 (native-inputs `(("emacs" ,emacs-minimal)
514 ("tar" ,tar)
515 ("gzip" ,gzip)))
516 (propagated-inputs `(("dash" ,emacs-dash)
517 ("magit" ,magit)))
518 (arguments
519 `(#:modules ((guix build utils)
520 (guix build emacs-utils))
521
522 #:builder
523 (begin
524 (use-modules (guix build utils)
525 (guix build emacs-utils))
526
527 (let* ((tar (string-append (assoc-ref %build-inputs "tar")
528 "/bin/tar"))
529 (PATH (string-append (assoc-ref %build-inputs "gzip")
530 "/bin"))
531 (emacs (string-append (assoc-ref %build-inputs "emacs")
532 "/bin/emacs"))
533 (magit (string-append (assoc-ref %build-inputs "magit")
534 "/share/emacs/site-lisp"))
535 (dash (string-append (assoc-ref %build-inputs "dash")
536 "/share/emacs/site-lisp/guix.d/dash-"
537 ,(package-version emacs-dash)))
538 (source (assoc-ref %build-inputs "source"))
539 (lisp-dir (string-append %output "/share/emacs/site-lisp")))
540 (setenv "PATH" PATH)
541 (system* tar "xvf" source)
542
543 (install-file (string-append ,name "-" ,version "/magit-svn.el")
544 lisp-dir)
545
546 (with-directory-excursion lisp-dir
547 (parameterize ((%emacs emacs))
548 (emacs-generate-autoloads ,name lisp-dir)
549 (setenv "EMACSLOADPATH"
550 (string-append ":" magit ":" dash))
551 (emacs-batch-eval '(byte-compile-file "magit-svn.el"))))))))
552 (home-page "https://github.com/magit/magit-svn")
553 (synopsis "Git-SVN extension to Magit")
554 (description
555 "This package is an extension to Magit, the Git Emacs mode, providing
556 support for Git-SVN.")
557 (license license:gpl3+)))
558
559 (define-public haskell-mode
560 (package
561 (name "haskell-mode")
562 (version "13.14.2")
563 (source (origin
564 (method url-fetch)
565 (file-name (string-append name "-" version ".tar.gz"))
566 (uri (string-append
567 "https://github.com/haskell/haskell-mode/archive/v"
568 version ".tar.gz"))
569 (sha256
570 (base32 "1kxc2yj8vb122dv91r68h7c5ladcryx963fr16plfhg71fv7f9av"))))
571 (native-inputs
572 `(("emacs" ,emacs-minimal)
573 ("texinfo" ,texinfo)))
574 (build-system gnu-build-system)
575 (arguments
576 `(#:make-flags (list (string-append "EMACS="
577 (assoc-ref %build-inputs "emacs")
578 "/bin/emacs"))
579 #:phases
580 (modify-phases %standard-phases
581 (delete 'configure)
582 (add-before
583 'build 'pre-build
584 (lambda* (#:key inputs #:allow-other-keys)
585 (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
586 (setenv "SHELL" "sh")
587 (substitute* (find-files "." "\\.el") (("/bin/sh") sh))
588 #t)))
589 (replace
590 'install
591 (lambda* (#:key outputs #:allow-other-keys)
592 (let* ((out (assoc-ref outputs "out"))
593 (el-dir (string-append out "/share/emacs/site-lisp"))
594 (doc (string-append
595 out "/share/doc/haskell-mode-" ,version))
596 (info (string-append out "/share/info")))
597 (define (copy-to-dir dir files)
598 (for-each (lambda (f)
599 (install-file f dir))
600 files))
601
602 (with-directory-excursion "doc"
603 (unless (zero? (system* "makeinfo" "haskell-mode.texi"))
604 (error "makeinfo failed"))
605 (install-file "haskell-mode.info" info))
606 (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
607 (copy-to-dir el-dir (find-files "." "\\.elc?"))
608 ;; these are now distributed with emacs
609 (with-directory-excursion el-dir
610 (for-each delete-file '("cl-lib.el" "ert.el")))
611 #t))))))
612 (home-page "https://github.com/haskell/haskell-mode")
613 (synopsis "Haskell mode for Emacs")
614 (description
615 "This is an Emacs mode for editing, debugging and developing Haskell
616 programs.")
617 (license license:gpl3+)))
618
619 (define-public let-alist
620 (package
621 (name "emacs-let-alist")
622 (version "1.0.4")
623 (source (origin
624 (method url-fetch)
625 (uri (string-append "http://elpa.gnu.org/packages/let-alist-"
626 version ".el"))
627 (sha256
628 (base32
629 "07312bvvyz86lf64vdkxg2l1wgfjl25ljdjwlf1bdzj01c4hm88x"))))
630 (build-system trivial-build-system)
631 (arguments
632 `(#:modules ((guix build utils)
633 (guix build emacs-utils))
634
635 #:builder (begin
636 (use-modules (guix build emacs-utils)
637 (guix build utils))
638
639 (let* ((out (assoc-ref %outputs "out"))
640 (lispdir (string-append out
641 "/share/emacs/site-lisp/"
642 "guix.d/let-alist-"
643 ,version))
644 (emacs (assoc-ref %build-inputs "emacs")))
645
646 (mkdir-p lispdir)
647 (copy-file (assoc-ref %build-inputs "source")
648 (string-append lispdir "/let-alist.el"))
649
650 (setenv "PATH" (string-append emacs "/bin"))
651 (emacs-byte-compile-directory lispdir)
652 #t))))
653 (native-inputs `(("emacs" ,emacs-minimal)))
654 (home-page "http://elpa.gnu.org/packages/let-alist.html")
655 (synopsis "Easily let-bind values of an assoc-list by their names")
656 (description
657 "This package offers a single Emacs Lisp macro, @code{let-alist}. This
658 macro takes a first argument, whose value must be an alist (association list),
659 and a body.
660
661 The macro expands to a let form containing the body, where each dotted symbol
662 inside body is let-bound to their cdrs in the alist. Only those present in
663 the body are let-bound and this search is done at compile time.")
664 (license license:gpl3+)))
665
666 (define-public flycheck
667 (package
668 (name "emacs-flycheck")
669 (version "0.23")
670 (source (origin
671 (method url-fetch)
672 (uri (string-append
673 "https://github.com/flycheck/flycheck/releases/download/"
674 version "/flycheck-" version ".tar"))
675 (sha256
676 (base32
677 "1n2cifzsl5dbv42l82bi3y1vk6q33msi8dd4bj7b9nvnl9jfjj5b"))))
678 (build-system emacs-build-system)
679 (propagated-inputs
680 `(("emacs-dash" ,emacs-dash)
681 ("emacs-let-alist" ,let-alist)))
682 (home-page "https://www.flycheck.org")
683 (synopsis "On-the-fly syntax checking")
684 (description
685 "This package provides on-the-fly syntax checking for GNU Emacs. It is a
686 replacement for the older Flymake extension which is part of GNU Emacs, with
687 many improvements and additional features.
688
689 Flycheck provides fully-automatic, fail-safe, on-the-fly background syntax
690 checking for over 30 programming and markup languages with more than 70
691 different tools. It highlights errors and warnings inline in the buffer, and
692 provides an optional IDE-like error list.")
693 (license license:gpl3+))) ;+GFDLv1.3+ for the manual
694
695 \f
696 ;;;
697 ;;; Web browsing.
698 ;;;
699
700 (define-public emacs-w3m
701 (package
702 (name "emacs-w3m")
703 (version "1.4.538+0.20141022")
704 (source (origin
705 (method url-fetch)
706 (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
707 version ".orig.tar.gz"))
708 (sha256
709 (base32
710 "0zfxmq86pwk64yv0426gnjrvhjrgrjqn08sdcdhmmjmfpmqvm79y"))))
711 (build-system gnu-build-system)
712 (native-inputs `(("autoconf" ,autoconf)
713 ("emacs" ,emacs-minimal)))
714 (inputs `(("w3m" ,w3m)
715 ("imagemagick" ,imagemagick)))
716 (arguments
717 `(#:modules ((guix build gnu-build-system)
718 (guix build utils)
719 (guix build emacs-utils))
720 #:imported-modules (,@%gnu-build-system-modules
721 (guix build emacs-utils))
722 #:configure-flags
723 (let ((out (assoc-ref %outputs "out")))
724 (list (string-append "--with-lispdir="
725 out "/share/emacs/site-lisp")
726 (string-append "--with-icondir="
727 out "/share/images/emacs-w3m")
728 ;; Leave .el files uncompressed, otherwise GC can't
729 ;; identify run-time dependencies. See
730 ;; <http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00208.html>
731 "--without-compress-install"))
732 #:tests? #f ; no check target
733 #:phases
734 (modify-phases %standard-phases
735 (add-after 'unpack 'autoconf
736 (lambda _
737 (zero? (system* "autoconf"))))
738 (add-before 'build 'patch-exec-paths
739 (lambda* (#:key inputs outputs #:allow-other-keys)
740 (let ((out (assoc-ref outputs "out"))
741 (w3m (assoc-ref inputs "w3m"))
742 (imagemagick (assoc-ref inputs "imagemagick"))
743 (coreutils (assoc-ref inputs "coreutils")))
744 (emacs-substitute-variables "w3m.el"
745 ("w3m-command" (string-append w3m "/bin/w3m"))
746 ("w3m-touch-command"
747 (string-append coreutils "/bin/touch"))
748 ("w3m-image-viewer"
749 (string-append imagemagick "/bin/display"))
750 ("w3m-icon-directory"
751 (string-append out "/share/images/emacs-w3m")))
752 (emacs-substitute-variables "w3m-image.el"
753 ("w3m-imagick-convert-program"
754 (string-append imagemagick "/bin/convert"))
755 ("w3m-imagick-identify-program"
756 (string-append imagemagick "/bin/identify")))
757 #t)))
758 (replace 'install
759 (lambda* (#:key outputs #:allow-other-keys)
760 (and (zero? (system* "make" "install" "install-icons"))
761 (with-directory-excursion
762 (string-append (assoc-ref outputs "out")
763 "/share/emacs/site-lisp")
764 (for-each delete-file '("ChangeLog" "ChangeLog.1"))
765 (symlink "w3m-load.el" "w3m-autoloads.el")
766 #t)))))))
767 (home-page "http://emacs-w3m.namazu.org/")
768 (synopsis "Simple Web browser for Emacs based on w3m")
769 (description
770 "Emacs-w3m is an emacs interface for the w3m web browser.")
771 (license license:gpl2+)))
772
773 (define-public emacs-wget
774 (package
775 (name "emacs-wget")
776 (version "0.5.0")
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_"
780 version ".orig.tar.gz"))
781 (sha256
782 (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff"))))
783 (build-system gnu-build-system)
784 (inputs `(("wget" ,wget)))
785 (native-inputs `(("emacs" ,emacs-minimal)))
786 (arguments
787 `(#:modules ((guix build gnu-build-system)
788 (guix build utils)
789 (guix build emacs-utils))
790 #:imported-modules (,@%gnu-build-system-modules
791 (guix build emacs-utils))
792 #:tests? #f ; no check target
793 #:phases
794 (alist-replace
795 'configure
796 (lambda* (#:key outputs #:allow-other-keys)
797 (substitute* "Makefile"
798 (("/usr/local") (assoc-ref outputs "out"))
799 (("/site-lisp/emacs-wget") "/site-lisp")))
800 (alist-cons-before
801 'build 'patch-exec-paths
802 (lambda* (#:key inputs outputs #:allow-other-keys)
803 (let ((wget (assoc-ref inputs "wget")))
804 (emacs-substitute-variables "wget.el"
805 ("wget-command" (string-append wget "/bin/wget")))))
806 (alist-cons-after
807 'install 'post-install
808 (lambda* (#:key outputs #:allow-other-keys)
809 (emacs-generate-autoloads
810 "wget" (string-append (assoc-ref outputs "out")
811 "/share/emacs/site-lisp/")))
812 %standard-phases)))))
813 (home-page "http://www.emacswiki.org/emacs/EmacsWget")
814 (synopsis "Simple file downloader for Emacs based on wget")
815 (description
816 "Emacs-wget is an emacs interface for the wget file downloader.")
817 (license license:gpl2+)))
818
819 \f
820 ;;;
821 ;;; Multimedia.
822 ;;;
823
824 (define-public emms
825 (package
826 (name "emms")
827 (version "4.0")
828 (source (origin
829 (method url-fetch)
830 (uri (string-append "mirror://gnu/emms/emms-"
831 version ".tar.gz"))
832 (sha256
833 (base32
834 "1q0n3iwva8bvai2rl9sm49sdjmk0wi7vajz4knz01l7g67nrp87l"))
835 (modules '((guix build utils)))
836 (snippet
837 '(substitute* "Makefile"
838 (("/usr/bin/install-info")
839 ;; No need to use 'install-info' since it would create a
840 ;; useless 'dir' file.
841 "true")
842 (("^INFODIR=.*")
843 ;; Install Info files to $out/share/info, not $out/info.
844 "INFODIR := $(PREFIX)/share/info\n")
845 (("/site-lisp/emms")
846 ;; Install directly in share/emacs/site-lisp, not in a
847 ;; sub-directory.
848 "/site-lisp")
849 (("^all: (.*)\n" _ rest)
850 ;; Build 'emms-print-metadata'.
851 (string-append "all: " rest " emms-print-metadata\n"))))))
852 (build-system gnu-build-system)
853 (arguments
854 `(#:modules ((guix build gnu-build-system)
855 (guix build utils)
856 (guix build emacs-utils))
857 #:imported-modules (,@%gnu-build-system-modules
858 (guix build emacs-utils))
859
860 #:phases (alist-replace
861 'configure
862 (lambda* (#:key inputs outputs #:allow-other-keys)
863 (let ((out (assoc-ref outputs "out"))
864 (vorbis (assoc-ref inputs "vorbis-tools"))
865 (alsa (assoc-ref inputs "alsa-utils"))
866 (mpg321 (assoc-ref inputs "mpg321"))
867 (mp3info (assoc-ref inputs "mp3info")))
868 ;; Specify the installation directory.
869 (substitute* "Makefile"
870 (("PREFIX=.*$")
871 (string-append "PREFIX := " out "\n")))
872
873 (setenv "SHELL" (which "sh"))
874 (setenv "CC" "gcc")
875
876 ;; Specify the absolute file names of the various
877 ;; programs so that everything works out-of-the-box.
878 (with-directory-excursion "lisp"
879 (emacs-substitute-variables
880 "emms-player-mpg321-remote.el"
881 ("emms-player-mpg321-remote-command"
882 (string-append mpg321 "/bin/mpg321")))
883 (substitute* "emms-player-simple.el"
884 (("\"ogg123\"")
885 (string-append "\"" vorbis "/bin/ogg123\"")))
886 (emacs-substitute-variables "emms-info-ogginfo.el"
887 ("emms-info-ogginfo-program-name"
888 (string-append vorbis "/bin/ogginfo")))
889 (emacs-substitute-variables "emms-info-libtag.el"
890 ("emms-info-libtag-program-name"
891 (string-append out "/bin/emms-print-metadata")))
892 (emacs-substitute-variables "emms-info-mp3info.el"
893 ("emms-info-mp3info-program-name"
894 (string-append mp3info "/bin/mp3info")))
895 (substitute* "emms-volume-amixer.el"
896 (("\"amixer\"")
897 (string-append "\"" alsa "/bin/amixer\"")))
898 (substitute* "emms-tag-editor.el"
899 (("\"mp3info\"")
900 (string-append "\"" mp3info "/bin/mp3info\""))))))
901 (alist-cons-before
902 'install 'pre-install
903 (lambda* (#:key outputs #:allow-other-keys)
904 ;; The 'install' rule expects the target directory to
905 ;; exist.
906 (let* ((out (assoc-ref outputs "out"))
907 (man1 (string-append out "/share/man/man1")))
908 (mkdir-p man1)
909 #t))
910 (alist-cons-after
911 'install 'post-install
912 (lambda* (#:key outputs #:allow-other-keys)
913 (let* ((out (assoc-ref outputs "out"))
914 (target (string-append
915 out "/bin/emms-print-metadata")))
916 (symlink "emms-auto.el"
917 (string-append out "/share/emacs/site-lisp/"
918 "emms-autoloads.el"))
919 (mkdir-p (dirname target))
920 (copy-file "src/emms-print-metadata" target)
921 (chmod target #o555)))
922 %standard-phases)))
923 #:tests? #f))
924 (native-inputs `(("emacs" ,emacs-minimal) ;for (guix build emacs-utils)
925 ("texinfo" ,texinfo)))
926 (inputs `(("alsa-utils" ,alsa-utils)
927 ("vorbis-tools" ,vorbis-tools)
928 ("mpg321" ,mpg321)
929 ("taglib" ,taglib)
930 ("mp3info" ,mp3info)))
931 (synopsis "Emacs Multimedia System")
932 (description
933 "EMMS is the Emacs Multimedia System. It is a small front-end which
934 can control one of the supported external players. Thus, it supports
935 whatever formats are supported by your music player. It also
936 supports tagging and playlist management, all behind a clean and
937 light user interface.")
938 (home-page "http://www.gnu.org/software/emms/")
939 (license license:gpl3+)))
940
941 \f
942 ;;;
943 ;;; Miscellaneous.
944 ;;;
945
946 (define-public bbdb
947 (package
948 (name "bbdb")
949 (version "3.1.2")
950 (source (origin
951 (method url-fetch)
952 (uri (string-append "mirror://savannah/bbdb/bbdb-"
953 version ".tar.gz"))
954 (sha256
955 (base32
956 "1gs16bbpiiy01w9pyg12868r57kx1v3hnw04gmqsmpc40l1hyy05"))
957 (modules '((guix build utils)))
958 (snippet
959 ;; We don't want to build and install the PDF.
960 '(substitute* "doc/Makefile.in"
961 (("^doc_DATA = .*$")
962 "doc_DATA =\n")))))
963 (build-system gnu-build-system)
964 (arguments
965 '(#:phases (alist-cons-after
966 'install 'post-install
967 (lambda* (#:key outputs #:allow-other-keys)
968 ;; Add an autoloads file with the right name for guix.el.
969 (let* ((out (assoc-ref outputs "out"))
970 (site (string-append out "/share/emacs/site-lisp")))
971 (with-directory-excursion site
972 (symlink "bbdb-loaddefs.el" "bbdb-autoloads.el"))))
973 %standard-phases)))
974 (native-inputs `(("emacs" ,emacs-minimal)))
975 (home-page "http://savannah.nongnu.org/projects/bbdb/")
976 (synopsis "Contact management utility for Emacs")
977 (description
978 "BBDB is the Insidious Big Brother Database for GNU Emacs. It provides
979 an address book for email and snail mail addresses, phone numbers and the
980 like. It can be linked with various Emacs mail clients (Message and Mail
981 mode, Rmail, Gnus, MH-E, and VM). BBDB is fully customizable.")
982 (license license:gpl3+)))
983
984 (define-public emacs-async
985 (package
986 (name "emacs-async")
987 (version "1.9")
988 (source (origin
989 (method url-fetch)
990 (uri (string-append "http://elpa.gnu.org/packages/async-"
991 version ".tar"))
992 (sha256
993 (base32
994 "1ip5nc8xyln5szvqwp6wqva9xr84pn8ssn3nnphrszr19y4js2bm"))))
995 (build-system emacs-build-system)
996 (home-page "http://elpa.gnu.org/packages/async.html")
997 (synopsis "Asynchronous processing in Emacs")
998 (description
999 "This package provides the ability to call asynchronous functions and
1000 processes. For example, it can be used to run dired commands (for copying,
1001 moving, etc.) asynchronously using @code{dired-async-mode}. Also it is used
1002 as a library for other Emacs packages.")
1003 (license license:gpl3+)))
1004
1005 (define-public emacs-auctex
1006 (package
1007 (name "emacs-auctex")
1008 (version "11.88.6")
1009 (source
1010 (origin
1011 (method url-fetch)
1012 (uri (string-append
1013 "http://elpa.gnu.org/packages/auctex-"
1014 version
1015 ".tar"))
1016 (sha256
1017 (base32
1018 "1pmki8hdjjikxlvip3pzi350bln3gcimr27yjf0xfwjvnp5hh9nc"))))
1019 (build-system emacs-build-system)
1020 ;; We use 'emacs' because AUCTeX requires dbus at compile time
1021 ;; ('emacs-minimal' does not provide dbus).
1022 (arguments `(#:emacs ,emacs))
1023 (native-inputs
1024 `(("perl" ,perl)))
1025 (home-page "http://www.gnu.org/software/auctex/")
1026 (synopsis "Integrated environment for TeX")
1027 (description
1028 "AUCTeX is a comprehensive customizable integrated environment for
1029 writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using Emacs
1030 or XEmacs.")
1031 (license license:gpl3+)))
1032
1033 (define-public emacs-mmm-mode
1034 (package
1035 (name "emacs-mmm-mode")
1036 (version "0.5.4")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (string-append
1041 "https://github.com/purcell/mmm-mode/archive/"
1042 version ".tar.gz"))
1043 (file-name (string-append name "-" version ".tar.gz"))
1044 (sha256
1045 (base32
1046 "10kwslnflbjqm62wkrq420crqzdqalzfflp9pqk1i12zm6dm4mfv"))))
1047 (build-system gnu-build-system)
1048 (arguments
1049 '(#:phases
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'autogen
1052 (lambda _
1053 (zero? (system* "sh" "autogen.sh")))))))
1054 (native-inputs
1055 `(("autoconf" ,autoconf)
1056 ("automake" ,automake)
1057 ("emacs" ,emacs-minimal)
1058 ("texinfo" ,texinfo)))
1059 (home-page "https://github.com/purcell/mmm-mode")
1060 (synopsis "Allow multiple major modes in an Emacs buffer")
1061 (description
1062 "MMM Mode is a minor mode that allows multiple major modes to coexist in a
1063 single buffer.")
1064 (license license:gpl3+)))
1065
1066 (define-public emacs-pdf-tools
1067 (package
1068 (name "emacs-pdf-tools")
1069 (version "0.70")
1070 (source (origin
1071 (method url-fetch)
1072 (uri (string-append
1073 "https://github.com/politza/pdf-tools/archive/v"
1074 version ".tar.gz"))
1075 (file-name (string-append name "-" version ".tar.gz"))
1076 (sha256
1077 (base32
1078 "1m0api6wiawswyk46bdsyk6r5rg3b86a4paar6nassm6x6c6vr77"))))
1079 (build-system gnu-build-system)
1080 (arguments
1081 `(#:tests? #f ; there are no tests
1082 #:modules ((guix build gnu-build-system)
1083 ((guix build emacs-build-system) #:prefix emacs:)
1084 (guix build utils)
1085 (guix build emacs-utils))
1086 #:imported-modules (,@%gnu-build-system-modules
1087 (guix build emacs-build-system)
1088 (guix build emacs-utils))
1089 #:phases
1090 (modify-phases %standard-phases
1091 ;; Build server side using 'gnu-build-system'.
1092 (add-after 'unpack 'enter-server-dir
1093 (lambda _ (chdir "server") #t))
1094 (add-before 'configure 'autogen
1095 (lambda _
1096 (zero? (system* "bash" "autogen.sh"))))
1097
1098 ;; Build emacs side using 'emacs-build-system'.
1099 (add-after 'compress-documentation 'enter-lisp-dir
1100 (lambda _ (chdir "../lisp") #t))
1101 (add-after 'enter-lisp-dir 'emacs-patch-variables
1102 (lambda* (#:key outputs #:allow-other-keys)
1103 ;; Set path to epdfinfo program.
1104 (emacs-substitute-variables "pdf-info.el"
1105 ("pdf-info-epdfinfo-program"
1106 (string-append (assoc-ref outputs "out")
1107 "/bin/epdfinfo")))
1108 ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
1109 ;; upgrading" that pdf-tools tries to perform.
1110 (emacs-substitute-variables "pdf-tools.el"
1111 ("pdf-tools-handle-upgrades" '()))))
1112 (add-after 'emacs-patch-variables 'emacs-install
1113 (assoc-ref emacs:%standard-phases 'install))
1114 (add-after 'emacs-install 'emacs-build
1115 (assoc-ref emacs:%standard-phases 'build))
1116 (add-after 'emacs-install 'emacs-make-autoloads
1117 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1118 (native-inputs `(("autoconf" ,autoconf)
1119 ("automake" ,automake)
1120 ("pkg-config" ,pkg-config)
1121 ("emacs" ,emacs-minimal)))
1122 (propagated-inputs
1123 `(("let-alist" ,let-alist)))
1124 (inputs `(("poppler" ,poppler)
1125 ("cairo" ,cairo)
1126 ("glib" ,glib)
1127 ("libpng" ,libpng)
1128 ("zlib" ,zlib)))
1129 (synopsis "Emacs support library for PDF files")
1130 (description
1131 "PDF Tools is, among other things, a replacement of DocView for PDF
1132 files. The key difference is that pages are not pre-rendered by
1133 e.g. ghostscript and stored in the file-system, but rather created on-demand
1134 and stored in memory.")
1135 (home-page "https://github.com/politza/pdf-tools")
1136 (license license:gpl3+)))
1137
1138 (define-public emacs-dash
1139 (package
1140 (name "emacs-dash")
1141 (version "2.12.1")
1142 (source (origin
1143 (method url-fetch)
1144 (uri (string-append
1145 "https://github.com/magnars/dash.el/archive/"
1146 version ".tar.gz"))
1147 (file-name (string-append name "-" version ".tar.gz"))
1148 (sha256
1149 (base32
1150 "082jl7mp4x063bpj5ad2pc5125k0d6p7rb89gcj7ny3lma9h2ij1"))))
1151 (build-system emacs-build-system)
1152 (arguments
1153 `(#:phases
1154 (modify-phases %standard-phases
1155 (add-before 'install 'check
1156 (lambda _
1157 (zero? (system* "./run-tests.sh")))))))
1158 (home-page "https://github.com/magnars/dash.el")
1159 (synopsis "Modern list library for Emacs")
1160 (description "This package provides a modern list API library for Emacs.")
1161 (license license:gpl3+)))
1162
1163 (define-public emacs-undo-tree
1164 (package
1165 (name "emacs-undo-tree")
1166 (version "0.6.4")
1167 (source (origin
1168 (method git-fetch)
1169 (uri (git-reference
1170 (url "http://dr-qubit.org/git/undo-tree.git")
1171 (commit "release/0.6.4")))
1172 (file-name (string-append name "-" version "-checkout"))
1173 (sha256
1174 (base32
1175 "0b6hnv6bq1g5np5q2yw9r9aj1cxpp14akm21br7vpb7wp01fv4b3"))))
1176 (build-system emacs-build-system)
1177 (home-page "http://www.dr-qubit.org/emacs.php")
1178 (synopsis "Treat undo history as a tree")
1179 (description "Tree-like interface to Emacs undo system, providing
1180 graphical tree presentation of all previous states of buffer that
1181 allows easily move between them.")
1182 (license license:gpl3+)))
1183
1184 (define-public emacs-s
1185 (package
1186 (name "emacs-s")
1187 (version "1.9.0")
1188 (source (origin
1189 (method url-fetch)
1190 (uri (string-append
1191 "https://github.com/magnars/s.el/archive/"
1192 version ".tar.gz"))
1193 (file-name (string-append name "-" version ".tar.gz"))
1194 (sha256
1195 (base32
1196 "1gah2k577gvnmxlpw7zrz0jr571vghzhdv2hbgchlgah07czd091"))))
1197 (build-system emacs-build-system)
1198 (arguments
1199 `(#:phases
1200 (modify-phases %standard-phases
1201 (add-before 'install 'check
1202 (lambda _
1203 (zero? (system* "./run-tests.sh")))))))
1204 (home-page "https://github.com/magnars/s.el")
1205 (synopsis "Emacs string manipulation library")
1206 (description "This package provides an Emacs library for manipulating
1207 strings.")
1208 (license license:gpl3+)))
1209
1210 (define-public emacs-f
1211 (package
1212 (name "emacs-f")
1213 (version "0.17.2")
1214 (source (origin
1215 (method url-fetch)
1216 (uri (string-append
1217 "https://github.com/rejeep/f.el/archive/v"
1218 version ".tar.gz"))
1219 (file-name (string-append name "-" version ".tar.gz"))
1220 (sha256
1221 (base32
1222 "1n5gcldf43wmkr7jxgs519v21zavwr0yn8048iv6gvgfwicnyjlx"))))
1223 (build-system emacs-build-system)
1224 (propagated-inputs
1225 `(("emacs-s" ,emacs-s)
1226 ("emacs-dash" ,emacs-dash)))
1227 (home-page "http://github.com/rejeep/f.el")
1228 (synopsis "Emacs API for working with files and directories")
1229 (description "This package provides an Emacs library for working with
1230 files and directories.")
1231 (license license:gpl3+)))
1232
1233 (define-public emacs-ob-ipython
1234 (package
1235 (name "emacs-ob-ipython")
1236 (version "20150704.8807064693")
1237 (source (origin
1238 (method git-fetch)
1239 (uri (git-reference
1240 (commit "8807064693")
1241 (url "https://github.com/gregsexton/ob-ipython.git")))
1242 (sha256
1243 (base32
1244 "1scf25snbds9ymagpny30ijbsg479r3nm0ih01dy4m9d0g7qryb7"))))
1245 (build-system emacs-build-system)
1246 (propagated-inputs
1247 `(("emacs-f" ,emacs-f)))
1248 (home-page "http://www.gregsexton.org")
1249 (synopsis "Org-Babel functions for IPython evaluation")
1250 (description "This package adds support to Org-Babel for evaluating Python
1251 source code using IPython.")
1252 (license license:gpl3+)))
1253
1254 (define-public emacs-debbugs
1255 (package
1256 (name "emacs-debbugs")
1257 (version "0.9")
1258 (source (origin
1259 (method url-fetch)
1260 (uri (string-append "http://elpa.gnu.org/packages/debbugs-"
1261 version ".tar"))
1262 (sha256
1263 (base32
1264 "1wc6kw7hihqqdx8qyl01akygycnan44x400hwrcf54m3hb4isa0k"))))
1265 (build-system emacs-build-system)
1266 (propagated-inputs
1267 `(("emacs-async" ,emacs-async)))
1268 (home-page "http://elpa.gnu.org/packages/debbugs.html")
1269 (synopsis "Access the Debbugs bug tracker in Emacs")
1270 (description
1271 "This package lets you access the @uref{http://bugs.gnu.org,GNU Bug
1272 Tracker} from within Emacs.
1273
1274 For instance, it defines the command @code{M-x debbugs-gnu} for listing bugs,
1275 and the command @code{M-x debbugs-gnu-search} for bug searching. If you
1276 prefer the listing of bugs as TODO items of @code{org-mode}, you could use
1277 @code{M-x debbugs-org} and related commands.
1278
1279 A minor mode @code{debbugs-browse-mode} let you browse URLs to the GNU Bug
1280 Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
1281 (license license:gpl3+)))
1282
1283 (define-public emacs-deferred
1284 (package
1285 (name "emacs-deferred")
1286 (version "0.3.2")
1287 (home-page "https://github.com/kiwanami/emacs-deferred")
1288 (source (origin
1289 (method git-fetch)
1290 (uri (git-reference
1291 (url home-page)
1292 (commit (string-append "v" version))))
1293 (sha256
1294 (base32
1295 "0059jy01ni5irpgrj9fa81ayd9j25nvmjjm79ms3210ysx4pgqdr"))
1296 (file-name (string-append name "-" version))))
1297 (build-system emacs-build-system)
1298 ;; FIXME: Would need 'el-expectations' to actually run tests.
1299 (synopsis "Simple asynchronous functions for Emacs Lisp")
1300 (description
1301 "The @code{deferred.el} library provides support for asynchronous tasks.
1302 The API is almost the same as that of
1303 @uref{https://github.com/cho45/jsdeferred, JSDeferred}, a JavaScript library
1304 for asynchronous tasks.")
1305 (license license:gpl3+)))
1306
1307 (define-public butler
1308 (package
1309 (name "emacs-butler")
1310 (version "0.2.4")
1311 (home-page "https://github.com/AshtonKem/Butler")
1312 (source (origin
1313 (method git-fetch)
1314 (uri (git-reference
1315 (url home-page)
1316 (commit version)))
1317 (sha256
1318 (base32
1319 "1pii9dw4skq7nr4na6qxqasl36av8cwjp71bf1fgppqpcd9z8skj"))
1320 (file-name (string-append name "-" version))))
1321 (build-system emacs-build-system)
1322 (propagated-inputs
1323 `(("emacs-deferred" ,emacs-deferred)))
1324 (synopsis "Emacs client for Jenkins")
1325 (description
1326 "Butler provides an interface to connect to Jenkins continuous
1327 integration servers. Users can specify a list of server in the
1328 @code{butler-server-list} variable and then use @code{M-x butler-status} to
1329 view the build status of those servers' build jobs, and possibly to trigger
1330 build jobs.")
1331 (license license:gpl3+)))
1332
1333 (define-public typo
1334 (package
1335 (name "emacs-typo")
1336 (version "1.1")
1337 (home-page "https://github.com/jorgenschaefer/typoel")
1338 (source (origin
1339 (method git-fetch)
1340 (uri (git-reference
1341 (url home-page)
1342 (commit (string-append "v" version))))
1343 (sha256
1344 (base32
1345 "1jhd4grch5iz12gyxwfbsgh4dmz5hj4bg4gnvphccg8dsnni05k2"))
1346 (file-name (string-append name "-" version))))
1347 (build-system emacs-build-system)
1348 (synopsis "Minor mode for typographic editing")
1349 (description
1350 "This package provides two Emacs modes, @code{typo-mode} and
1351 @code{typo-global-mode}. These modes automatically insert Unicode characters
1352 for quotation marks, dashes, and ellipses. For example, typing @kbd{\"}
1353 automatically inserts a Unicode opening or closing quotation mark, depending
1354 on context.")
1355 (license license:gpl3+)))
1356
1357 (define-public emacs-scheme-complete
1358 (let ((commit "9b5cf224bf2a5994bc6d5b152ff487517f1a9bb5"))
1359 (package
1360 (name "emacs-scheme-complete")
1361 (version (string-append "20151223." (string-take commit 8)))
1362 (source
1363 (origin
1364 (file-name (string-append name "-" version))
1365 (method git-fetch)
1366 (uri (git-reference
1367 (url "https://github.com/ashinn/scheme-complete.git")
1368 (commit commit)))
1369 (sha256
1370 (base32
1371 "141wn9l0m33w0g3dqmx8nxbfdny1r5xbr6ak61rsz21bk0qafs7x"))
1372 (patches
1373 (search-patches "emacs-scheme-complete-scheme-r5rs-info.patch"))))
1374 (build-system emacs-build-system)
1375 (home-page "https://github.com/ashinn/scheme-complete")
1376 (synopsis "Smart tab completion for Scheme in Emacs")
1377 (description
1378 "This file provides a single function, @code{scheme-smart-complete},
1379 which you can use for intelligent, context-sensitive completion for any Scheme
1380 implementation in Emacs. To use it just load this file and bind that function
1381 to a key in your preferred mode.")
1382 (license license:public-domain))))
1383
1384 (define-public emacs-mit-scheme-doc
1385 (package
1386 (name "emacs-mit-scheme-doc")
1387 (version "20140203")
1388 (source
1389 (origin
1390 (modules '((guix build utils)))
1391 (snippet
1392 ;; keep only file of interest
1393 '(begin
1394 (for-each delete-file '("dot-emacs.el" "Makefile"))
1395 (copy-file "6.945-config/mit-scheme-doc.el" "mit-scheme-doc.el")
1396 (delete-file-recursively "6.945-config")))
1397 (file-name (string-append name "-" version ".tar.bz2"))
1398 (method url-fetch)
1399 (uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/"
1400 "6.945/dont-panic/emacs-basic-config.tar.bz2"))
1401 (sha256
1402 (base32
1403 "0dqidg2bd66pawqfarvwca93w5gqf9mikn1k2a2rmd9ymfjpziq1"))))
1404 (build-system emacs-build-system)
1405 (inputs `(("mit-scheme" ,mit-scheme)))
1406 (arguments
1407 `(#:phases
1408 (modify-phases %standard-phases
1409 (add-after 'unpack 'configure-doc
1410 (lambda* (#:key inputs #:allow-other-keys)
1411 (let* ((mit-scheme-dir (assoc-ref inputs "mit-scheme"))
1412 (doc-dir (string-append mit-scheme-dir "/share/doc/"
1413 "mit-scheme-"
1414 ,(package-version mit-scheme))))
1415 (substitute* "mit-scheme-doc.el"
1416 (("http://www\\.gnu\\.org/software/mit-scheme/documentation/mit-scheme-ref/")
1417 (string-append "file:" doc-dir "/mit-scheme-ref/")))))))))
1418 (home-page "http://groups.csail.mit.edu/mac/users/gjs/6.945/dont-panic/")
1419 (synopsis "MIT-Scheme documentation lookup for Emacs")
1420 (description
1421 "This package provides a set of Emacs functions to search definitions of
1422 identifiers in the MIT-Scheme documentation.")
1423 (license license:gpl2+)))
1424
1425 ;;; XXX: move this procedure to an utility module
1426 (define* (uncompressed-file-fetch url hash-algo hash
1427 #:optional name
1428 #:key (system (%current-system))
1429 (guile (default-guile)))
1430 (mlet %store-monad ((drv (url-fetch url hash-algo hash name
1431 #:system system
1432 #:guile guile)))
1433 (gexp->derivation (or name (basename url))
1434 #~(begin
1435 (mkdir #$output)
1436 (chdir #$output)
1437 (copy-file #$drv (basename #$url))))))
1438
1439 (define-public emacs-constants
1440 (package
1441 (name "emacs-constants")
1442 (version "2.6")
1443 (home-page "https://staff.fnwi.uva.nl/c.dominik/Tools/constants")
1444 (source
1445 (origin
1446 (file-name (string-append name "-" version ".el"))
1447 (method url-fetch)
1448 (uri (string-append "https://github.com/fedeinthemix/emacs-constants"
1449 "/archive/v" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "0pnrpmmxq8mh5h2hbrp5vcym0j0fh6dv3s7c5ccn18wllhzg9g7n"))))
1453 (build-system emacs-build-system)
1454 (synopsis "Enter definition of constants into an Emacs buffer")
1455 (description
1456 "This package provides functions for inserting the definition of natural
1457 constants and units into an Emacs buffer.")
1458 (license license:gpl2+)))
1459
1460 (define-public emacs-slime
1461 (package
1462 (name "emacs-slime")
1463 (version "2.15")
1464 (source
1465 (origin
1466 (file-name (string-append name "-" version ".tar.gz"))
1467 (method url-fetch)
1468 (uri (string-append
1469 "https://github.com/slime/slime/archive/v"
1470 version ".tar.gz"))
1471 (sha256
1472 (base32
1473 "0l2z6l2xm78mhh0nczkrmzh2ddb1n911ij9xb6q40zwvx4f8blds"))))
1474 (build-system emacs-build-system)
1475 (native-inputs
1476 `(("texinfo" ,texinfo)))
1477 (arguments
1478 `(#:phases
1479 (modify-phases %standard-phases
1480 (add-before 'install 'configure
1481 (lambda* _
1482 (emacs-substitute-variables "slime.el"
1483 ("inferior-lisp-program" "sbcl"))
1484 #t))
1485 (add-before 'install 'install-doc
1486 (lambda* (#:key outputs #:allow-other-keys)
1487 (let* ((out (assoc-ref outputs "out"))
1488 (info-dir (string-append out "/share/info"))
1489 (doc-dir (string-append out "/share/doc/"
1490 ,name "-" ,version))
1491 (doc-files '("doc/slime-refcard.pdf"
1492 "README.md" "NEWS" "PROBLEMS"
1493 "CONTRIBUTING.md")))
1494 (with-directory-excursion "doc"
1495 (substitute* "Makefile"
1496 (("infodir=/usr/local/info")
1497 (string-append "infodir=" info-dir)))
1498 (system* "make" "html/index.html")
1499 (system* "make" "slime.info")
1500 (install-file "slime.info" info-dir)
1501 (copy-recursively "html" (string-append doc-dir "/html")))
1502 (for-each (lambda (f)
1503 (install-file f doc-dir)
1504 (delete-file f))
1505 doc-files)
1506 (delete-file-recursively "doc")
1507 #t))))))
1508 (home-page "https://github.com/slime/slime")
1509 (synopsis "Superior Lisp Interaction Mode for Emacs")
1510 (description
1511 "SLIME extends Emacs with support for interactive programming in
1512 Common Lisp. The features are centered around @{slime-mode}, an Emacs
1513 minor mode that complements the standard @{lisp-mode}. While lisp-mode
1514 supports editing Lisp source files, @{slime-mode} adds support for
1515 interacting with a running Common Lisp process for compilation,
1516 debugging, documentation lookup, and so on.")
1517 (license license:gpl2+)))
1518
1519 (define-public emacs-popup
1520 (package
1521 (name "emacs-popup")
1522 (version "0.5.3")
1523 (source (origin
1524 (method url-fetch)
1525 (uri (string-append
1526 "https://github.com/auto-complete/popup-el/archive/v"
1527 version ".tar.gz"))
1528 (file-name (string-append name "-" version ".tar.gz"))
1529 (sha256
1530 (base32
1531 "1yrgfj8y69xmcb6kwgplhq68ndm9410qwh7sd2knnd1gchpphdc0"))))
1532 (build-system emacs-build-system)
1533 (home-page "https://github.com/auto-complete/popup-el")
1534 (synopsis "Visual Popup User Interface for Emacs")
1535 (description
1536 "Popup.el is a visual popup user interface library for Emacs.
1537 This provides a basic API and common UI widgets such as popup tooltips
1538 and popup menus.")
1539 (license license:gpl3+)))
1540
1541 (define-public emacs-god-mode
1542 (let ((commit "6cf0807b6555eb6fcf8387a4e3b667071ef38964")
1543 (revision "1"))
1544 (package
1545 (name "emacs-god-mode")
1546 (version (string-append "20151005.925."
1547 revision "-" (string-take commit 9)))
1548 (source
1549 (origin
1550 (method git-fetch)
1551 (uri (git-reference
1552 (url "https://github.com/chrisdone/god-mode.git")
1553 (commit commit)))
1554 (file-name (string-append name "-" version "-checkout"))
1555 (sha256
1556 (base32
1557 "1am415k4xxcva6y3vbvyvknzc6bma49pq3p85zmpjsdmsp18qdix"))))
1558 (build-system emacs-build-system)
1559 (home-page "https://github.com/chrisdone/god-mode")
1560 (synopsis "Minor mode for entering commands without modifier keys")
1561 (description
1562 "This package provides a global minor mode for entering Emacs commands
1563 without modifier keys. It's similar to Vim's separation of commands and
1564 insertion mode. When enabled all keys are implicitly prefixed with
1565 @samp{C-} (among other helpful shortcuts).")
1566 (license license:gpl3+))))
1567
1568 (define-public emacs-rfcview
1569 (package
1570 (name "emacs-rfcview")
1571 (version "0.13")
1572 (home-page "http://www.loveshack.ukfsn.org/emacs")
1573 (source (origin
1574 (method uncompressed-file-fetch)
1575 (uri "http://www.loveshack.ukfsn.org/emacs/rfcview.el")
1576 (sha256
1577 (base32
1578 "0ympj5rxig383zl2jf0pzdsa80nnq0dpvjiriq0ivfi98fj7kxbz"))))
1579 (build-system emacs-build-system)
1580 (synopsis "Prettify Request for Comments (RFC) documents")
1581 (description "The Internet Engineering Task Force (IETF) and the Internet
1582 Society (ISOC) publish various Internet-related protocols and specifications
1583 as \"Request for Comments\" (RFC) documents and Internet Standard (STD)
1584 documents. RFCs and STDs are published in a simple text form. This package
1585 provides an Emacs major mode, rfcview-mode, which makes it more pleasant to
1586 read these documents in Emacs. It prettifies the text and adds
1587 hyperlinks/menus for easier navigation. It also provides functions for
1588 browsing the index of RFC documents and fetching them from remote servers or
1589 local directories.")
1590 (license license:gpl3+)))
1591
1592 (define-public emacs-ffap-rfc-space
1593 (package
1594 (name "emacs-ffap-rfc-space")
1595 (version "12")
1596 (home-page "http://user42.tuxfamily.org/ffap-rfc-space/index.html")
1597 (source (origin
1598 (method uncompressed-file-fetch)
1599 (uri "http://download.tuxfamily.org/user42/ffap-rfc-space.el")
1600 (sha256
1601 (base32
1602 "1iv61dv57a73mdps7rn6zmgz7nqh14v0ninidyrasy45b1nv6gck"))))
1603 (build-system emacs-build-system)
1604 (synopsis "Make ffap recognize an RFC with a space before its number")
1605 (description "The Internet Engineering Task Force (IETF) and the
1606 Internet Society (ISOC) publish various Internet-related protocols and
1607 specifications as \"Request for Comments\" (RFC) documents. The
1608 built-in Emacs module \"ffap\" (Find File at Point) has the ability to
1609 recognize names at point which look like \"RFC1234\" and \"RFC-1234\"
1610 and load the appropriate RFC from a remote server. However, it fails
1611 to recognize a name like \"RFC 1234\". This package enhances ffap so
1612 that it correctly finds RFCs even when a space appears before the
1613 number.")
1614 (license license:gpl3+)))
1615
1616 (define-public emacs-zenburn-theme
1617 (package
1618 (name "emacs-zenburn-theme")
1619 (version "2.4")
1620 (source (origin
1621 (method url-fetch)
1622 (uri (string-append
1623 "https://github.com/bbatsov/zenburn-emacs/archive/v"
1624 version ".tar.gz"))
1625 (file-name (string-append name "-" version ".tar.gz"))
1626 (sha256
1627 (base32
1628 "0lyi84bm8sa7vj40n6zg6rlbsmi53mi1y9xn6gkjj29s5zbcnlg7"))))
1629 (build-system emacs-build-system)
1630 (home-page "http://github.com/bbatsov/zenburn-emacs")
1631 (synopsis "Low contrast color theme for Emacs")
1632 (description
1633 "Zenburn theme is a port of the popular Vim Zenburn theme for Emacs.
1634 It is built on top of the custom theme support in Emacs 24 or later.")
1635 (license license:gpl3+)))
1636
1637 (define-public emacs-smartparens
1638 (package
1639 (name "emacs-smartparens")
1640 (version "1.7.1")
1641 (source (origin
1642 (method url-fetch)
1643 (uri (string-append
1644 "https://github.com/Fuco1/smartparens/archive/"
1645 version ".tar.gz"))
1646 (file-name (string-append name "-" version ".tar.gz"))
1647 (sha256
1648 (base32
1649 "1b47ppkzsj8j8a2p0bmvq05rhm2d2lsm3wlc0sg542r4zr6nji8s"))))
1650 (build-system emacs-build-system)
1651 (propagated-inputs `(("emacs-dash" ,emacs-dash)))
1652 (home-page "https://github.com/Fuco1/smartparens")
1653 (synopsis "Paredit-like insertion, wrapping and navigation with user
1654 defined pairs")
1655 (description
1656 "Smartparens is a minor mode for Emacs that deals with parens pairs
1657 and tries to be smart about it. It started as a unification effort to
1658 combine functionality of several existing packages in a single,
1659 compatible and extensible way to deal with parentheses, delimiters, tags
1660 and the like. Some of these packages include autopair, textmate,
1661 wrap-region, electric-pair-mode, paredit and others. With the basic
1662 features found in other packages it also brings many improvements as
1663 well as completely new features.")
1664 (license license:gpl3+)))
1665
1666 (define-public emacs-clojure-mode
1667 (package
1668 (name "emacs-clojure-mode")
1669 (version "5.3.0")
1670 (source (origin
1671 (method url-fetch)
1672 (uri (string-append
1673 "https://github.com/clojure-emacs/clojure-mode/archive/"
1674 version ".tar.gz"))
1675 (file-name (string-append name "-" version ".tar.gz"))
1676 (sha256
1677 (base32
1678 "0gi8ra3ap5m3mz4qh1yxp2cldn7z9xcxvypznr6rrlc6a9l8s5a6"))))
1679 (build-system emacs-build-system)
1680 (home-page "http://github.com/clojure-emacs/clojure-mode")
1681 (synopsis "Major mode for Clojure code")
1682 (description
1683 "This Emacs package provides font-lock, indentation, navigation and basic
1684 refactoring for the @uref{http://clojure.org, Clojure programming language}.
1685 It is recommended to use @code{clojure-mode} with paredit or smartparens.")
1686 (license license:gpl3+)))