gnu: Add Pfff.
[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 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages emacs)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system emacs)
31 #:use-module (guix build-system glib-or-gtk)
32 #:use-module (guix build-system trivial)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages guile)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages texinfo)
39 #:use-module (gnu packages tls)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages xorg)
42 #:use-module (gnu packages lesstif)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages version-control)
46 #:use-module (gnu packages imagemagick)
47 #:use-module (gnu packages w3m)
48 #:use-module (gnu packages wget)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages acl)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pdf)
57 #:use-module (gnu packages xiph)
58 #:use-module (gnu packages mp3)
59 #:use-module (guix utils)
60 #:use-module (srfi srfi-1))
61
62 (define-public emacs
63 (package
64 (name "emacs")
65 (version "24.5")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "mirror://gnu/emacs/emacs-"
69 version ".tar.xz"))
70 (sha256
71 (base32
72 "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
73 (patches (list (search-patch "emacs-exec-path.patch")))))
74 (build-system glib-or-gtk-build-system)
75 (arguments
76 '(#:phases (modify-phases %standard-phases
77 (add-before 'configure 'fix-/bin/pwd
78 (lambda _
79 ;; Use `pwd', not `/bin/pwd'.
80 (substitute* (find-files "." "^Makefile\\.in$")
81 (("/bin/pwd")
82 "pwd"))))
83 (add-after 'install 'remove-info.info
84 (lambda* (#:key outputs #:allow-other-keys)
85 ;; Remove 'info.info', which is provided by Texinfo.
86 (let ((out (assoc-ref outputs "out")))
87 (delete-file
88 (string-append out "/share/info/info.info.gz"))
89 #t))))))
90 (inputs
91 `(("gnutls" ,gnutls)
92 ("ncurses" ,ncurses)
93
94 ;; TODO: Add the optional dependencies.
95 ("libx11" ,libx11)
96 ("gtk+" ,gtk+)
97 ("libxft" ,libxft)
98 ("libtiff" ,libtiff)
99 ("giflib" ,giflib)
100 ("libjpeg" ,libjpeg-8)
101 ("acl" ,acl)
102
103 ;; When looking for libpng `configure' links with `-lpng -lz', so we
104 ;; must also provide zlib as an input.
105 ("libpng" ,libpng)
106 ("zlib" ,zlib)
107
108 ("librsvg" ,librsvg)
109 ("libxpm" ,libxpm)
110 ("libxml2" ,libxml2)
111 ("libice" ,libice)
112 ("libsm" ,libsm)
113 ("alsa-lib" ,alsa-lib)
114 ("dbus" ,dbus)))
115 (native-inputs
116 `(("pkg-config" ,pkg-config)
117 ("texinfo" ,texinfo)))
118
119 (native-search-paths
120 (list (search-path-specification
121 (variable "INFOPATH")
122 (files '("share/info")))))
123
124 (home-page "http://www.gnu.org/software/emacs/")
125 (synopsis "The extensible, customizable, self-documenting text editor")
126 (description
127 "GNU Emacs is an extensible and highly customizable text editor. It is
128 based on an Emacs Lisp interpreter with extensions for text editing. Emacs
129 has been extended in essentially all areas of computing, giving rise to a
130 vast array of packages supporting, e.g., email, IRC and XMPP messaging,
131 spreadsheets, remote server editing, and much more. Emacs includes extensive
132 documentation on all aspects of the system, from basic editing to writing
133 large Lisp programs. It has full Unicode support for nearly all human
134 languages.")
135 (license license:gpl3+)))
136
137 (define-public emacs-no-x
138 ;; This is the version that you should use as an input to packages that just
139 ;; need to byte-compile .el files.
140 (package (inherit emacs)
141 (name "emacs-no-x")
142 (synopsis "The extensible, customizable, self-documenting text
143 editor (console only)")
144 (build-system gnu-build-system)
145 (inputs (fold alist-delete
146 (package-inputs emacs)
147 '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg"
148 "libpng" "librsvg" "libxpm" "libice" "libsm"
149
150 ;; D-Bus depends on libx11, so remove it as well.
151 "dbus")))))
152
153 (define-public emacs-no-x-toolkit
154 (package (inherit emacs)
155 (name "emacs-no-x-toolkit")
156 (synopsis "The extensible, customizable, self-documenting text
157 editor (without an X toolkit)" )
158 (build-system gnu-build-system)
159 (inputs (append `(("inotify-tools" ,inotify-tools))
160 (alist-delete "gtk+" (package-inputs emacs))))
161 (arguments (append '(#:configure-flags '("--with-x-toolkit=no"))
162 (package-arguments emacs)))))
163
164 (define-public guile-emacs
165 (package (inherit emacs)
166 (name "guile-emacs")
167 (version "20150512.41120e0")
168 (source (origin
169 (method git-fetch)
170 (uri (git-reference
171 (url "git://git.hcoop.net/git/bpt/emacs.git")
172 (commit "41120e0f595b16387eebfbf731fff70481de1b4b")))
173 (sha256
174 (base32
175 "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6"))))
176 (native-inputs
177 `(("autoconf" ,autoconf)
178 ("automake" ,automake)
179 ("guile" ,guile-for-guile-emacs)
180 ,@(package-native-inputs emacs)))
181 (arguments
182 (substitute-keyword-arguments `(;; Build fails if we allow parallel build.
183 #:parallel-build? #f
184 ;; Tests aren't passing for now.
185 #:tests? #f
186 ,@(package-arguments emacs))
187 ((#:phases phases)
188 `(modify-phases ,phases
189 (add-after 'unpack 'autogen
190 (lambda _
191 (zero? (system* "sh" "autogen.sh"))))))))))
192
193 \f
194 ;;;
195 ;;; Emacs hacking.
196 ;;;
197
198 (define-public geiser
199 (package
200 (name "geiser")
201 (version "0.8.1")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "mirror://savannah/geiser/" version
205 "/geiser-" version ".tar.gz"))
206 (sha256
207 (base32
208 "163zh8qf1q8l485d94a51a9xixirj8r2xvrbgxyw06vkaqrz5qvc"))))
209 (build-system gnu-build-system)
210 (arguments
211 '(#:phases (alist-cons-after
212 'install 'post-install
213 (lambda* (#:key outputs #:allow-other-keys)
214 (symlink "geiser-install.el"
215 (string-append (assoc-ref outputs "out")
216 "/share/emacs/site-lisp/"
217 "geiser-autoloads.el")))
218 %standard-phases)))
219 (inputs `(("guile" ,guile-2.0)
220 ("emacs" ,emacs-no-x)))
221 (home-page "http://nongnu.org/geiser/")
222 (synopsis "Collection of Emacs modes for Guile and Racket hacking")
223 (description
224 "Geiser is a collection of Emacs major and minor modes that conspire with
225 one or more Scheme implementations to keep the Lisp Machine Spirit alive. The
226 continuously running Scheme interpreter takes the center of the stage in
227 Geiser. A bundle of Elisp shims orchestrates the dialog between the Scheme
228 implementation, Emacs and, ultimately, the schemer, giving them access to live
229 metadata.")
230 (license license:bsd-3)))
231
232 (define-public paredit
233 (package
234 (name "paredit")
235 (version "24")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
239 version ".el"))
240 (sha256
241 (base32
242 "0pp3n8q6kc70blqsaw0zlzp6bc327dpgdrjr0cnh7hqg1lras7ka"))))
243 (build-system trivial-build-system)
244 (inputs `(("emacs" ,emacs-no-x)))
245 (arguments
246 `(#:modules ((guix build utils)
247 (guix build emacs-utils))
248 #:builder
249 (begin
250 (use-modules (guix build utils))
251 (use-modules (guix build emacs-utils))
252
253 (let* ((emacs (string-append (assoc-ref %build-inputs "emacs")
254 "/bin/emacs"))
255 (source (assoc-ref %build-inputs "source"))
256 (lisp-dir (string-append %output
257 "/share/emacs/site-lisp"))
258 (target (string-append lisp-dir "/paredit.el")))
259 (mkdir-p lisp-dir)
260 (copy-file source target)
261 (with-directory-excursion lisp-dir
262 (parameterize ((%emacs emacs))
263 (emacs-generate-autoloads ,name lisp-dir)
264 (emacs-batch-eval '(byte-compile-file "paredit.el"))))))))
265 (home-page "http://mumble.net/~campbell/emacs/paredit/")
266 (synopsis "Emacs minor mode for editing parentheses")
267 (description
268 "ParEdit (paredit.el) is a minor mode for performing structured editing
269 of S-expression data. The typical example of this would be Lisp or Scheme
270 source code.
271
272 ParEdit helps **keep parentheses balanced** and adds many keys for moving
273 S-expressions and moving around in S-expressions. Its behavior can be jarring
274 for those who may want transient periods of unbalanced parentheses, such as
275 when typing parentheses directly or commenting out code line by line.")
276 (license license:gpl3+)))
277
278 (define-public git-modes
279 (package
280 (name "git-modes")
281 (version "1.2.0")
282 (source (origin
283 (method url-fetch)
284 (uri (string-append
285 "https://github.com/magit/git-modes/archive/"
286 version ".tar.gz"))
287 (file-name (string-append name "-" version ".tar.gz"))
288 (sha256
289 (base32
290 "09dv7ikbj2bi4y3lmvjfzqpdmx2f9bd4w7jkp10bkap62d05iqhk"))))
291 (build-system gnu-build-system)
292 (arguments
293 `(#:modules ((guix build gnu-build-system)
294 (guix build emacs-utils)
295 (guix build utils))
296 #:imported-modules (,@%gnu-build-system-modules
297 (guix build emacs-utils))
298
299 #:make-flags (list (string-append "PREFIX="
300 (assoc-ref %outputs "out"))
301 ;; Don't put .el files in a 'git-modes'
302 ;; sub-directory.
303 (string-append "LISPDIR="
304 (assoc-ref %outputs "out")
305 "/share/emacs/site-lisp"))
306 #:tests? #f ; no check target
307 #:phases (modify-phases %standard-phases
308 (delete 'configure)
309 (add-after 'install 'emacs-autoloads
310 (lambda* (#:key outputs #:allow-other-keys)
311 (let* ((out (assoc-ref outputs "out"))
312 (lisp (string-append
313 out "/share/emacs/site-lisp/")))
314 (emacs-generate-autoloads ,name lisp)))))))
315 (native-inputs `(("emacs" ,emacs-no-x)))
316 (home-page "https://github.com/magit/git-modes")
317 (synopsis "Emacs major modes for Git configuration files")
318 (description
319 "This package provides Emacs major modes for editing various Git
320 configuration files, such as .gitattributes, .gitignore, and .git/config.")
321 (license license:gpl3+)))
322
323 (define-public magit
324 (package
325 (name "magit")
326 (version "2.3.1")
327 (source (origin
328 (method url-fetch)
329 (uri (string-append
330 "https://github.com/magit/magit/releases/download/"
331 version "/" name "-" version ".tar.gz"))
332 (sha256
333 (base32
334 "1wnx034adkwhbsydd10il2099hpzz351kp39sri8s1yd43f795gf"))))
335 (build-system gnu-build-system)
336 (native-inputs `(("texinfo" ,texinfo)
337 ("emacs" ,emacs-no-x)))
338 (inputs `(("git" ,git)))
339 (propagated-inputs `(("dash" ,emacs-dash)))
340 (arguments
341 `(#:modules ((guix build gnu-build-system)
342 (guix build utils)
343 (guix build emacs-utils))
344 #:imported-modules (,@%gnu-build-system-modules
345 (guix build emacs-utils))
346
347 #:test-target "test"
348 #:tests? #f ; tests are not included in the release
349
350 #:make-flags
351 (list (string-append "PREFIX=" %output)
352 ;; Don't put .el files in a sub-directory.
353 (string-append "lispdir=" %output "/share/emacs/site-lisp")
354 (string-append "DASH_DIR="
355 (assoc-ref %build-inputs "dash")
356 "/share/emacs/site-lisp/guix.d/dash-"
357 ,(package-version emacs-dash)))
358
359 #:phases
360 (modify-phases %standard-phases
361 (delete 'configure)
362 (add-before
363 'build 'patch-exec-paths
364 (lambda* (#:key inputs #:allow-other-keys)
365 (let ((git (assoc-ref inputs "git")))
366 (emacs-substitute-variables "lisp/magit-git.el"
367 ("magit-git-executable" (string-append git "/bin/git")))
368 #t))))))
369 (home-page "http://magit.github.io/")
370 (synopsis "Emacs interface for the Git version control system")
371 (description
372 "With Magit, you can inspect and modify your Git repositories with Emacs.
373 You can review and commit the changes you have made to the tracked files, for
374 example, and you can browse the history of past changes. There is support for
375 cherry picking, reverting, merging, rebasing, and other common Git
376 operations.")
377 (license license:gpl3+)))
378
379 (define-public magit-svn
380 (package
381 (name "magit-svn")
382 (version "2.1.1")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append
386 "https://github.com/magit/magit-svn/archive/"
387 version ".tar.gz"))
388 (file-name (string-append name "-" version ".tar.gz"))
389 (sha256
390 (base32
391 "04y88j7q9h8xjbx5dbick6n5nr1522sn9i1znp0qwk3vjb4b5mzz"))))
392 (build-system trivial-build-system)
393 (native-inputs `(("emacs" ,emacs-no-x)
394 ("tar" ,tar)
395 ("gzip" ,gzip)))
396 (propagated-inputs `(("dash" ,emacs-dash)
397 ("magit" ,magit)))
398 (arguments
399 `(#:modules ((guix build utils)
400 (guix build emacs-utils))
401
402 #:builder
403 (begin
404 (use-modules (guix build utils)
405 (guix build emacs-utils))
406
407 (let* ((tar (string-append (assoc-ref %build-inputs "tar")
408 "/bin/tar"))
409 (PATH (string-append (assoc-ref %build-inputs "gzip")
410 "/bin"))
411 (emacs (string-append (assoc-ref %build-inputs "emacs")
412 "/bin/emacs"))
413 (magit (string-append (assoc-ref %build-inputs "magit")
414 "/share/emacs/site-lisp"))
415 (dash (string-append (assoc-ref %build-inputs "dash")
416 "/share/emacs/site-lisp/guix.d/dash-"
417 ,(package-version emacs-dash)))
418 (source (assoc-ref %build-inputs "source"))
419 (lisp-dir (string-append %output "/share/emacs/site-lisp")))
420 (setenv "PATH" PATH)
421 (system* tar "xvf" source)
422
423 (install-file (string-append ,name "-" ,version "/magit-svn.el")
424 lisp-dir)
425
426 (with-directory-excursion lisp-dir
427 (parameterize ((%emacs emacs))
428 (emacs-generate-autoloads ,name lisp-dir)
429 (setenv "EMACSLOADPATH"
430 (string-append ":" magit ":" dash))
431 (emacs-batch-eval '(byte-compile-file "magit-svn.el"))))))))
432 (home-page "https://github.com/magit/magit-svn")
433 (synopsis "Git-SVN extension to Magit")
434 (description
435 "This package is an extension to Magit, the Git Emacs mode, providing
436 support for Git-SVN.")
437 (license license:gpl3+)))
438
439 (define-public haskell-mode
440 (package
441 (name "haskell-mode")
442 (version "13.14.2")
443 (source (origin
444 (method url-fetch)
445 (file-name (string-append name "-" version ".tar.gz"))
446 (uri (string-append
447 "https://github.com/haskell/haskell-mode/archive/v"
448 version ".tar.gz"))
449 (sha256
450 (base32 "1kxc2yj8vb122dv91r68h7c5ladcryx963fr16plfhg71fv7f9av"))))
451 (inputs `(("emacs" ,emacs-no-x)))
452 (native-inputs
453 `(("texinfo" ,texinfo)))
454 (build-system gnu-build-system)
455 (arguments
456 `(#:make-flags (list (string-append "EMACS="
457 (assoc-ref %build-inputs "emacs")
458 "/bin/emacs"))
459 #:phases
460 (modify-phases %standard-phases
461 (delete 'configure)
462 (add-before
463 'build 'pre-build
464 (lambda* (#:key inputs #:allow-other-keys)
465 (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
466 (setenv "SHELL" "sh")
467 (substitute* (find-files "." "\\.el") (("/bin/sh") sh))
468 #t)))
469 (replace
470 'install
471 (lambda* (#:key outputs #:allow-other-keys)
472 (let* ((out (assoc-ref outputs "out"))
473 (el-dir (string-append out "/share/emacs/site-lisp"))
474 (doc (string-append
475 out "/share/doc/haskell-mode-" ,version))
476 (info (string-append out "/share/info")))
477 (define (copy-to-dir dir files)
478 (for-each (lambda (f)
479 (install-file f dir))
480 files))
481
482 (with-directory-excursion "doc"
483 (unless (zero? (system* "makeinfo" "haskell-mode.texi"))
484 (error "makeinfo failed"))
485 (install-file "haskell-mode.info" info))
486 (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
487 (copy-to-dir el-dir (find-files "." "\\.elc?"))
488 ;; these are now distributed with emacs
489 (with-directory-excursion el-dir
490 (for-each delete-file '("cl-lib.el" "ert.el")))
491 #t))))))
492 (home-page "https://github.com/haskell/haskell-mode")
493 (synopsis "Haskell mode for Emacs")
494 (description
495 "This is an Emacs mode for editing, debugging and developing Haskell
496 programs.")
497 (license license:gpl3+)))
498
499 (define-public let-alist
500 (package
501 (name "emacs-let-alist")
502 (version "1.0.4")
503 (source (origin
504 (method url-fetch)
505 (uri (string-append "http://elpa.gnu.org/packages/let-alist-"
506 version ".el"))
507 (sha256
508 (base32
509 "07312bvvyz86lf64vdkxg2l1wgfjl25ljdjwlf1bdzj01c4hm88x"))))
510 (build-system trivial-build-system)
511 (arguments
512 `(#:modules ((guix build utils)
513 (guix build emacs-utils))
514
515 #:builder (begin
516 (use-modules (guix build emacs-utils)
517 (guix build utils))
518
519 (let* ((out (assoc-ref %outputs "out"))
520 (lispdir (string-append out
521 "/share/emacs/site-lisp/"
522 "guix.d/let-alist-"
523 ,version))
524 (emacs (assoc-ref %build-inputs "emacs")))
525
526 (mkdir-p lispdir)
527 (copy-file (assoc-ref %build-inputs "source")
528 (string-append lispdir "/let-alist.el"))
529
530 (setenv "PATH" (string-append emacs "/bin"))
531 (emacs-byte-compile-directory lispdir)
532 #t))))
533 (native-inputs `(("emacs" ,emacs-no-x)))
534 (home-page "http://elpa.gnu.org/packages/let-alist.html")
535 (synopsis "Easily let-bind values of an assoc-list by their names")
536 (description
537 "This package offers a single Emacs Lisp macro, @code{let-alist}. This
538 macro takes a first argument, whose value must be an alist (association list),
539 and a body.
540
541 The macro expands to a let form containing the body, where each dotted symbol
542 inside body is let-bound to their cdrs in the alist. Only those present in
543 the body are let-bound and this search is done at compile time.")
544 (license license:gpl3+)))
545
546 (define-public flycheck
547 (package
548 (name "emacs-flycheck")
549 (version "0.23")
550 (source (origin
551 (method url-fetch)
552 (uri (string-append
553 "https://github.com/flycheck/flycheck/releases/download/"
554 version "/flycheck-" version ".tar"))
555 (sha256
556 (base32
557 "1n2cifzsl5dbv42l82bi3y1vk6q33msi8dd4bj7b9nvnl9jfjj5b"))))
558 (build-system emacs-build-system)
559 (propagated-inputs
560 `(("emacs-dash" ,emacs-dash)
561 ("emacs-let-alist" ,let-alist)))
562 (home-page "https://www.flycheck.org")
563 (synopsis "On-the-fly syntax checking")
564 (description
565 "This package provides on-the-fly syntax checking for GNU Emacs. It is a
566 replacement for the older Flymake extension which is part of GNU Emacs, with
567 many improvements and additional features.
568
569 Flycheck provides fully-automatic, fail-safe, on-the-fly background syntax
570 checking for over 30 programming and markup languages with more than 70
571 different tools. It highlights errors and warnings inline in the buffer, and
572 provides an optional IDE-like error list.")
573 (license license:gpl3+))) ;+GFDLv1.3+ for the manual
574
575 \f
576 ;;;
577 ;;; Web browsing.
578 ;;;
579
580 (define-public emacs-w3m
581 (package
582 (name "emacs-w3m")
583 (version "1.4.538+0.20141022")
584 (source (origin
585 (method url-fetch)
586 (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
587 version ".orig.tar.gz"))
588 (sha256
589 (base32
590 "0zfxmq86pwk64yv0426gnjrvhjrgrjqn08sdcdhmmjmfpmqvm79y"))))
591 (build-system gnu-build-system)
592 (native-inputs `(("autoconf" ,autoconf)))
593 (inputs `(("w3m" ,w3m)
594 ("imagemagick" ,imagemagick)
595 ("emacs" ,emacs-no-x)))
596 (arguments
597 `(#:modules ((guix build gnu-build-system)
598 (guix build utils)
599 (guix build emacs-utils))
600 #:imported-modules (,@%gnu-build-system-modules
601 (guix build emacs-utils))
602 #:configure-flags
603 (let ((out (assoc-ref %outputs "out")))
604 (list (string-append "--with-lispdir="
605 out "/share/emacs/site-lisp")
606 (string-append "--with-icondir="
607 out "/share/images/emacs-w3m")
608 ;; Leave .el files uncompressed, otherwise GC can't
609 ;; identify run-time dependencies. See
610 ;; <http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00208.html>
611 "--without-compress-install"))
612 #:tests? #f ; no check target
613 #:phases
614 (modify-phases %standard-phases
615 (add-after 'unpack 'autoconf
616 (lambda _
617 (zero? (system* "autoconf"))))
618 (add-before 'build 'patch-exec-paths
619 (lambda* (#:key inputs outputs #:allow-other-keys)
620 (let ((out (assoc-ref outputs "out"))
621 (w3m (assoc-ref inputs "w3m"))
622 (imagemagick (assoc-ref inputs "imagemagick"))
623 (coreutils (assoc-ref inputs "coreutils")))
624 (emacs-substitute-variables "w3m.el"
625 ("w3m-command" (string-append w3m "/bin/w3m"))
626 ("w3m-touch-command"
627 (string-append coreutils "/bin/touch"))
628 ("w3m-image-viewer"
629 (string-append imagemagick "/bin/display"))
630 ("w3m-icon-directory"
631 (string-append out "/share/images/emacs-w3m")))
632 (emacs-substitute-variables "w3m-image.el"
633 ("w3m-imagick-convert-program"
634 (string-append imagemagick "/bin/convert"))
635 ("w3m-imagick-identify-program"
636 (string-append imagemagick "/bin/identify")))
637 #t)))
638 (replace 'install
639 (lambda* (#:key outputs #:allow-other-keys)
640 (and (zero? (system* "make" "install" "install-icons"))
641 (with-directory-excursion
642 (string-append (assoc-ref outputs "out")
643 "/share/emacs/site-lisp")
644 (for-each delete-file '("ChangeLog" "ChangeLog.1"))
645 (symlink "w3m-load.el" "w3m-autoloads.el")
646 #t)))))))
647 (home-page "http://emacs-w3m.namazu.org/")
648 (synopsis "Simple Web browser for Emacs based on w3m")
649 (description
650 "Emacs-w3m is an emacs interface for the w3m web browser.")
651 (license license:gpl2+)))
652
653 (define-public emacs-wget
654 (package
655 (name "emacs-wget")
656 (version "0.5.0")
657 (source (origin
658 (method url-fetch)
659 (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_"
660 version ".orig.tar.gz"))
661 (sha256
662 (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff"))))
663 (build-system gnu-build-system)
664 (inputs `(("wget" ,wget)
665 ("emacs" ,emacs-no-x)))
666 (arguments
667 `(#:modules ((guix build gnu-build-system)
668 (guix build utils)
669 (guix build emacs-utils))
670 #:imported-modules (,@%gnu-build-system-modules
671 (guix build emacs-utils))
672 #:tests? #f ; no check target
673 #:phases
674 (alist-replace
675 'configure
676 (lambda* (#:key outputs #:allow-other-keys)
677 (substitute* "Makefile"
678 (("/usr/local") (assoc-ref outputs "out"))
679 (("/site-lisp/emacs-wget") "/site-lisp")))
680 (alist-cons-before
681 'build 'patch-exec-paths
682 (lambda* (#:key inputs outputs #:allow-other-keys)
683 (let ((wget (assoc-ref inputs "wget")))
684 (emacs-substitute-variables "wget.el"
685 ("wget-command" (string-append wget "/bin/wget")))))
686 (alist-cons-after
687 'install 'post-install
688 (lambda* (#:key outputs #:allow-other-keys)
689 (emacs-generate-autoloads
690 "wget" (string-append (assoc-ref outputs "out")
691 "/share/emacs/site-lisp/")))
692 %standard-phases)))))
693 (home-page "http://www.emacswiki.org/emacs/EmacsWget")
694 (synopsis "Simple file downloader for Emacs based on wget")
695 (description
696 "Emacs-wget is an emacs interface for the wget file downloader.")
697 (license license:gpl2+)))
698
699 \f
700 ;;;
701 ;;; Multimedia.
702 ;;;
703
704 (define-public emms
705 (package
706 (name "emms")
707 (version "4.0")
708 (source (origin
709 (method url-fetch)
710 (uri (string-append "mirror://gnu/emms/emms-"
711 version ".tar.gz"))
712 (sha256
713 (base32
714 "1q0n3iwva8bvai2rl9sm49sdjmk0wi7vajz4knz01l7g67nrp87l"))
715 (modules '((guix build utils)))
716 (snippet
717 '(substitute* "Makefile"
718 (("/usr/bin/install-info")
719 ;; No need to use 'install-info' since it would create a
720 ;; useless 'dir' file.
721 "true")
722 (("^INFODIR=.*")
723 ;; Install Info files to $out/share/info, not $out/info.
724 "INFODIR := $(PREFIX)/share/info\n")
725 (("/site-lisp/emms")
726 ;; Install directly in share/emacs/site-lisp, not in a
727 ;; sub-directory.
728 "/site-lisp")
729 (("^all: (.*)\n" _ rest)
730 ;; Build 'emms-print-metadata'.
731 (string-append "all: " rest " emms-print-metadata\n"))))))
732 (build-system gnu-build-system)
733 (arguments
734 `(#:modules ((guix build gnu-build-system)
735 (guix build utils)
736 (guix build emacs-utils))
737 #:imported-modules (,@%gnu-build-system-modules
738 (guix build emacs-utils))
739
740 #:phases (alist-replace
741 'configure
742 (lambda* (#:key inputs outputs #:allow-other-keys)
743 (let ((out (assoc-ref outputs "out"))
744 (vorbis (assoc-ref inputs "vorbis-tools"))
745 (alsa (assoc-ref inputs "alsa-utils"))
746 (mpg321 (assoc-ref inputs "mpg321"))
747 (mp3info (assoc-ref inputs "mp3info")))
748 ;; Specify the installation directory.
749 (substitute* "Makefile"
750 (("PREFIX=.*$")
751 (string-append "PREFIX := " out "\n")))
752
753 (setenv "SHELL" (which "sh"))
754 (setenv "CC" "gcc")
755
756 ;; Specify the absolute file names of the various
757 ;; programs so that everything works out-of-the-box.
758 (with-directory-excursion "lisp"
759 (emacs-substitute-variables
760 "emms-player-mpg321-remote.el"
761 ("emms-player-mpg321-remote-command"
762 (string-append mpg321 "/bin/mpg321")))
763 (substitute* "emms-player-simple.el"
764 (("\"ogg123\"")
765 (string-append "\"" vorbis "/bin/ogg123\"")))
766 (emacs-substitute-variables "emms-info-ogginfo.el"
767 ("emms-info-ogginfo-program-name"
768 (string-append vorbis "/bin/ogginfo")))
769 (emacs-substitute-variables "emms-info-libtag.el"
770 ("emms-info-libtag-program-name"
771 (string-append out "/bin/emms-print-metadata")))
772 (emacs-substitute-variables "emms-info-mp3info.el"
773 ("emms-info-mp3info-program-name"
774 (string-append mp3info "/bin/mp3info")))
775 (substitute* "emms-volume-amixer.el"
776 (("\"amixer\"")
777 (string-append "\"" alsa "/bin/amixer\"")))
778 (substitute* "emms-tag-editor.el"
779 (("\"mp3info\"")
780 (string-append "\"" mp3info "/bin/mp3info\""))))))
781 (alist-cons-before
782 'install 'pre-install
783 (lambda* (#:key outputs #:allow-other-keys)
784 ;; The 'install' rule expects the target directory to
785 ;; exist.
786 (let* ((out (assoc-ref outputs "out"))
787 (man1 (string-append out "/share/man/man1")))
788 (mkdir-p man1)
789 #t))
790 (alist-cons-after
791 'install 'post-install
792 (lambda* (#:key outputs #:allow-other-keys)
793 (let* ((out (assoc-ref outputs "out"))
794 (target (string-append
795 out "/bin/emms-print-metadata")))
796 (symlink "emms-auto.el"
797 (string-append out "/share/emacs/site-lisp/"
798 "emms-autoloads.el"))
799 (mkdir-p (dirname target))
800 (copy-file "src/emms-print-metadata" target)
801 (chmod target #o555)))
802 %standard-phases)))
803 #:tests? #f))
804 (native-inputs `(("emacs" ,emacs-no-x) ;for (guix build emacs-utils)
805 ("texinfo" ,texinfo)))
806 (inputs `(("alsa-utils" ,alsa-utils)
807 ("vorbis-tools" ,vorbis-tools)
808 ("mpg321" ,mpg321)
809 ("taglib" ,taglib)
810 ("mp3info" ,mp3info)))
811 (synopsis "Emacs Multimedia System")
812 (description
813 "EMMS is the Emacs Multimedia System. It is a small front-end which
814 can control one of the supported external players. Thus, it supports
815 whatever formats are supported by your music player. It also
816 supports tagging and playlist management, all behind a clean and
817 light user interface.")
818 (home-page "http://www.gnu.org/software/emms/")
819 (license license:gpl3+)))
820
821 \f
822 ;;;
823 ;;; Miscellaneous.
824 ;;;
825
826 (define-public bbdb
827 (package
828 (name "bbdb")
829 (version "3.1.2")
830 (source (origin
831 (method url-fetch)
832 (uri (string-append "mirror://savannah/bbdb/bbdb-"
833 version ".tar.gz"))
834 (sha256
835 (base32
836 "1gs16bbpiiy01w9pyg12868r57kx1v3hnw04gmqsmpc40l1hyy05"))
837 (modules '((guix build utils)))
838 (snippet
839 ;; We don't want to build and install the PDF.
840 '(substitute* "doc/Makefile.in"
841 (("^doc_DATA = .*$")
842 "doc_DATA =\n")))))
843 (build-system gnu-build-system)
844 (arguments
845 '(#:phases (alist-cons-after
846 'install 'post-install
847 (lambda* (#:key outputs #:allow-other-keys)
848 ;; Add an autoloads file with the right name for guix.el.
849 (let* ((out (assoc-ref outputs "out"))
850 (site (string-append out "/share/emacs/site-lisp")))
851 (with-directory-excursion site
852 (symlink "bbdb-loaddefs.el" "bbdb-autoloads.el"))))
853 %standard-phases)))
854 (native-inputs `(("emacs" ,emacs-no-x)))
855 (home-page "http://savannah.nongnu.org/projects/bbdb/")
856 (synopsis "Contact management utility for Emacs")
857 (description
858 "BBDB is the Insidious Big Brother Database for GNU Emacs. It provides
859 an address book for email and snail mail addresses, phone numbers and the
860 like. It can be linked with various Emacs mail clients (Message and Mail
861 mode, Rmail, Gnus, MH-E, and VM). BBDB is fully customizable.")
862 (license license:gpl3+)))
863
864 (define-public emacs-auctex
865 (package
866 (name "emacs-auctex")
867 (version "11.88.6")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append
872 "http://elpa.gnu.org/packages/auctex-"
873 version
874 ".tar"))
875 (sha256
876 (base32
877 "1pmki8hdjjikxlvip3pzi350bln3gcimr27yjf0xfwjvnp5hh9nc"))))
878 (build-system emacs-build-system)
879 (native-inputs
880 `(("perl" ,perl)))
881 (home-page "http://www.gnu.org/software/auctex/")
882 (synopsis "Integrated environment for TeX")
883 (description
884 "AUCTeX is a comprehensive customizable integrated environment for
885 writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using Emacs
886 or XEmacs.")
887 (license license:gpl3+)))
888
889 (define-public emacs-mmm-mode
890 (package
891 (name "emacs-mmm-mode")
892 (version "0.5.4")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (string-append
897 "https://github.com/purcell/mmm-mode/archive/"
898 version ".tar.gz"))
899 (file-name (string-append name "-" version ".tar.gz"))
900 (sha256
901 (base32
902 "10kwslnflbjqm62wkrq420crqzdqalzfflp9pqk1i12zm6dm4mfv"))))
903 (build-system gnu-build-system)
904 (arguments
905 '(#:phases
906 (modify-phases %standard-phases
907 (add-after 'unpack 'autogen
908 (lambda _
909 (zero? (system* "sh" "autogen.sh")))))))
910 (native-inputs
911 `(("autoconf" ,autoconf)
912 ("automake" ,automake)
913 ("emacs" ,emacs-no-x)
914 ("texinfo" ,texinfo)))
915 (home-page "https://github.com/purcell/mmm-mode")
916 (synopsis "Allow multiple major modes in an Emacs buffer")
917 (description
918 "MMM Mode is a minor mode that allows multiple major modes to coexist in a
919 single buffer.")
920 (license license:gpl3+)))
921
922 (define-public emacs-pdf-tools
923 (package
924 (name "emacs-pdf-tools")
925 (version "0.70")
926 (source (origin
927 (method url-fetch)
928 (uri (string-append
929 "https://github.com/politza/pdf-tools/archive/v"
930 version ".tar.gz"))
931 (file-name (string-append name "-" version ".tar.gz"))
932 (sha256
933 (base32
934 "1m0api6wiawswyk46bdsyk6r5rg3b86a4paar6nassm6x6c6vr77"))))
935 (build-system gnu-build-system)
936 (arguments
937 `(#:tests? #f ; there are no tests
938 #:modules ((guix build gnu-build-system)
939 (guix build utils)
940 (guix build emacs-utils))
941 #:imported-modules (,@%gnu-build-system-modules
942 (guix build emacs-utils))
943 #:phases
944 (modify-phases %standard-phases
945 (add-after 'unpack 'enter-dir (lambda _ (chdir "server") #t))
946 (add-before
947 'configure 'autogen
948 (lambda _
949 (zero? (system* "bash" "autogen.sh"))))
950 (add-before
951 'build 'patch-variables
952 (lambda* (#:key outputs #:allow-other-keys)
953 (with-directory-excursion "../lisp"
954 ;; Set path to epdfinfo program.
955 (emacs-substitute-variables "pdf-info.el"
956 ("pdf-info-epdfinfo-program"
957 (string-append (assoc-ref outputs "out")
958 "/bin/epdfinfo")))
959 ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
960 ;; upgrading" that pdf-tools tries to perform.
961 (emacs-substitute-variables "pdf-tools.el"
962 ("pdf-tools-handle-upgrades" '())))))
963 (add-after
964 'install 'install-lisp
965 (lambda* (#:key outputs #:allow-other-keys)
966 (let ((target (string-append (assoc-ref outputs "out")
967 "/share/emacs/site-lisp/")))
968 (for-each (lambda (file)
969 (install-file file target))
970 (find-files "../lisp" "^(pdf|tab).*\\.elc?"))
971 (emacs-byte-compile-directory target)
972 (emacs-generate-autoloads "pdf-tools" target)))))))
973 (native-inputs `(("autoconf" ,autoconf)
974 ("automake" ,automake)
975 ("pkg-config" ,pkg-config)
976 ("emacs" ,emacs-no-x)))
977 (inputs `(("poppler" ,poppler)
978 ("cairo" ,cairo)
979 ("glib" ,glib)
980 ("libpng" ,libpng)
981 ("zlib" ,zlib)))
982 (synopsis "Emacs support library for PDF files")
983 (description
984 "PDF Tools is, among other things, a replacement of DocView for PDF
985 files. The key difference is that pages are not pre-rendered by
986 e.g. ghostscript and stored in the file-system, but rather created on-demand
987 and stored in memory.")
988 (home-page "https://github.com/politza/pdf-tools")
989 (license license:gpl3+)))
990
991 (define-public emacs-dash
992 (package
993 (name "emacs-dash")
994 (version "2.12.1")
995 (source (origin
996 (method url-fetch)
997 (uri (string-append
998 "https://github.com/magnars/dash.el/archive/"
999 version ".tar.gz"))
1000 (file-name (string-append name "-" version ".tar.gz"))
1001 (sha256
1002 (base32
1003 "082jl7mp4x063bpj5ad2pc5125k0d6p7rb89gcj7ny3lma9h2ij1"))))
1004 (build-system emacs-build-system)
1005 (arguments
1006 `(#:phases
1007 (modify-phases %standard-phases
1008 (add-before 'install 'check
1009 (lambda _
1010 (zero? (system* "./run-tests.sh")))))))
1011 (home-page "https://github.com/magnars/dash.el")
1012 (synopsis "Modern list library for Emacs")
1013 (description "This package provides a modern list API library for Emacs.")
1014 (license license:gpl3+)))
1015
1016 (define-public emacs-undo-tree
1017 (package
1018 (name "emacs-undo-tree")
1019 (version "0.6.4")
1020 (source (origin
1021 (method git-fetch)
1022 (uri (git-reference
1023 (url "http://dr-qubit.org/git/undo-tree.git")
1024 (commit "release/0.6.4")))
1025 (file-name (string-append name "-" version "-checkout"))
1026 (sha256
1027 (base32
1028 "0b6hnv6bq1g5np5q2yw9r9aj1cxpp14akm21br7vpb7wp01fv4b3"))))
1029 (build-system emacs-build-system)
1030 (home-page "http://www.dr-qubit.org/emacs.php")
1031 (synopsis "Treat undo history as a tree")
1032 (description "Tree-like interface to Emacs undo system, providing
1033 graphical tree presentation of all previous states of buffer that
1034 allows easily move between them.")
1035 (license license:gpl3+)))
1036
1037 (define-public emacs-s
1038 (package
1039 (name "emacs-s")
1040 (version "1.9.0")
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append
1044 "https://github.com/magnars/s.el/archive/"
1045 version ".tar.gz"))
1046 (file-name (string-append name "-" version ".tar.gz"))
1047 (sha256
1048 (base32
1049 "1gah2k577gvnmxlpw7zrz0jr571vghzhdv2hbgchlgah07czd091"))))
1050 (build-system emacs-build-system)
1051 (arguments
1052 `(#:phases
1053 (modify-phases %standard-phases
1054 (add-before 'install 'check
1055 (lambda _
1056 (zero? (system* "./run-tests.sh")))))))
1057 (home-page "https://github.com/magnars/s.el")
1058 (synopsis "Emacs string manipulation library")
1059 (description "This package provides an Emacs library for manipulating
1060 strings.")
1061 (license license:gpl3+)))
1062
1063 (define-public emacs-f
1064 (package
1065 (name "emacs-f")
1066 (version "0.17.2")
1067 (source (origin
1068 (method url-fetch)
1069 (uri (string-append
1070 "https://github.com/rejeep/f.el/archive/v"
1071 version ".tar.gz"))
1072 (file-name (string-append name "-" version ".tar.gz"))
1073 (sha256
1074 (base32
1075 "1n5gcldf43wmkr7jxgs519v21zavwr0yn8048iv6gvgfwicnyjlx"))))
1076 (build-system emacs-build-system)
1077 (propagated-inputs
1078 `(("emacs-s" ,emacs-s)
1079 ("emacs-dash" ,emacs-dash)))
1080 (home-page "http://github.com/rejeep/f.el")
1081 (synopsis "Emacs API for working with files and directories")
1082 (description "This package provides an Emacs library for working with
1083 files and directories.")
1084 (license license:gpl3+)))
1085
1086 (define-public emacs-ob-ipython
1087 (package
1088 (name "emacs-ob-ipython")
1089 (version "20150704.8807064693")
1090 (source (origin
1091 (method git-fetch)
1092 (uri (git-reference
1093 (commit "8807064693")
1094 (url "https://github.com/gregsexton/ob-ipython.git")))
1095 (sha256
1096 (base32
1097 "1scf25snbds9ymagpny30ijbsg479r3nm0ih01dy4m9d0g7qryb7"))))
1098 (build-system emacs-build-system)
1099 (propagated-inputs
1100 `(("emacs-f" ,emacs-f)))
1101 (home-page "http://www.gregsexton.org")
1102 (synopsis "Org-Babel functions for IPython evaluation")
1103 (description "This package adds support to Org-Babel for evaluating Python
1104 source code using IPython.")
1105 (license license:gpl3+)))
1106
1107 (define-public emacs-debbugs
1108 (package
1109 (name "emacs-debbugs")
1110 (version "0.7")
1111 (source (origin
1112 (method url-fetch)
1113 (uri (string-append "http://elpa.gnu.org/packages/debbugs-"
1114 version ".tar"))
1115 (sha256
1116 (base32
1117 "0pbglx3paa8icazgxlg4jf40wl8war63y9j2jmbb7gbd1xp95v72"))))
1118 (build-system emacs-build-system)
1119 (home-page "http://elpa.gnu.org/packages/debbugs.html")
1120 (synopsis "Access the Debbugs bug tracker in Emacs")
1121 (description
1122 "This package lets you access the @uref{http://bugs.gnu.org,GNU Bug
1123 Tracker} from within Emacs.
1124
1125 For instance, it defines the command @code{M-x debbugs-gnu} for listing bugs,
1126 and the command @code{M-x debbugs-gnu-search} for bug searching. If you
1127 prefer the listing of bugs as TODO items of @code{org-mode}, you could use
1128 @code{M-x debbugs-org} and related commands.
1129
1130 A minor mode @code{debbugs-browse-mode} let you browse URLs to the GNU Bug
1131 Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
1132 (license license:gpl3+)))
1133
1134 (define-public emacs-deferred
1135 (package
1136 (name "emacs-deferred")
1137 (version "0.3.2")
1138 (home-page "https://github.com/kiwanami/emacs-deferred")
1139 (source (origin
1140 (method git-fetch)
1141 (uri (git-reference
1142 (url home-page)
1143 (commit (string-append "v" version))))
1144 (sha256
1145 (base32
1146 "0059jy01ni5irpgrj9fa81ayd9j25nvmjjm79ms3210ysx4pgqdr"))
1147 (file-name (string-append name "-" version))))
1148 (build-system emacs-build-system)
1149 ;; FIXME: Would need 'el-expectations' to actually run tests.
1150 (synopsis "Simple asynchronous functions for Emacs Lisp")
1151 (description
1152 "The @code{deferred.el} library provides support for asynchronous tasks.
1153 The API is almost the same as that of
1154 @uref{https://github.com/cho45/jsdeferred, JSDeferred}, a JavaScript library
1155 for asynchronous tasks.")
1156 (license license:gpl3+)))
1157
1158 (define-public butler
1159 (package
1160 (name "emacs-butler")
1161 (version "0.2.4")
1162 (home-page "https://github.com/AshtonKem/Butler")
1163 (source (origin
1164 (method git-fetch)
1165 (uri (git-reference
1166 (url home-page)
1167 (commit version)))
1168 (sha256
1169 (base32
1170 "1pii9dw4skq7nr4na6qxqasl36av8cwjp71bf1fgppqpcd9z8skj"))
1171 (file-name (string-append name "-" version))))
1172 (build-system emacs-build-system)
1173 (propagated-inputs
1174 `(("emacs-deferred" ,emacs-deferred)))
1175 (synopsis "Emacs client for Jenkins")
1176 (description
1177 "Butler provides an interface to connect to Jenkins continuous
1178 integration servers. Users can specify a list of server in the
1179 @code{butler-server-list} variable and then use @code{M-x butler-status} to
1180 view the build status of those servers' build jobs, and possibly to trigger
1181 build jobs.")
1182 (license license:gpl3+)))
1183
1184 (define-public typo
1185 (package
1186 (name "emacs-typo")
1187 (version "1.1")
1188 (home-page "https://github.com/jorgenschaefer/typoel")
1189 (source (origin
1190 (method git-fetch)
1191 (uri (git-reference
1192 (url home-page)
1193 (commit (string-append "v" version))))
1194 (sha256
1195 (base32
1196 "1jhd4grch5iz12gyxwfbsgh4dmz5hj4bg4gnvphccg8dsnni05k2"))
1197 (file-name (string-append name "-" version))))
1198 (build-system emacs-build-system)
1199 (synopsis "Minor mode for typographic editing")
1200 (description
1201 "This package provides two Emacs modes, @code{typo-mode} and
1202 @code{typo-global-mode}. These modes automatically insert Unicode characters
1203 for quotation marks, dashes, and ellipses. For example, typing @kbd{\"}
1204 automatically inserts a Unicode opening or closing quotation mark, depending
1205 on context.")
1206 (license license:gpl3+)))