1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages emacs)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system trivial)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages gtk)
29 #:use-module (gnu packages ncurses)
30 #:use-module (gnu packages texinfo)
31 #:use-module (gnu packages gnutls)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages guile)
34 #:use-module (gnu packages xorg)
35 #:use-module (gnu packages lesstif)
36 #:use-module (gnu packages image)
37 #:use-module (gnu packages giflib)
38 #:use-module (gnu packages linux)
39 #:use-module (gnu packages version-control)
40 #:use-module (gnu packages imagemagick)
41 #:use-module (gnu packages w3m)
42 #:use-module (gnu packages wget)
43 #:use-module (gnu packages autotools)
44 #:use-module ((gnu packages compression)
45 #:renamer (symbol-prefix-proc 'compression:))
46 #:use-module (gnu packages xml)
47 #:use-module (gnu packages glib)
48 #:use-module (guix utils)
49 #:use-module (srfi srfi-1))
57 (uri (string-append "mirror://gnu/emacs/emacs-"
61 "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh"))
62 (patches (list (search-patch "emacs-configure-sh.patch")))))
63 (build-system gnu-build-system)
66 (list (string-append "--with-crt-dir=" (assoc-ref %build-inputs "libc")
68 #:phases (alist-cons-before
69 'configure 'fix-/bin/pwd
71 ;; Use `pwd', not `/bin/pwd'.
72 (substitute* (find-files "." "^Makefile\\.in$")
80 ;; TODO: Add the optional dependencies.
86 ("libjpeg" ,libjpeg-8)
88 ;; When looking for libpng `configure' links with `-lpng -lz', so we
89 ;; must also provide zlib as an input.
91 ("zlib" ,compression:zlib)
97 ("alsa-lib" ,alsa-lib)
100 `(("pkg-config" ,pkg-config)
101 ("texinfo" ,texinfo)))
102 (home-page "http://www.gnu.org/software/emacs/")
103 (synopsis "The extensible, customizable, self-documenting text editor")
105 "GNU Emacs is an extensible and highly customizable text editor. It is
106 based on an Emacs Lisp interpreter with extensions for text editing. Emacs
107 has been extended in essentially all areas of computing, giving rise to a
108 vast array of packages supporting, e.g., email, IRC and XMPP messaging,
109 spreadsheets, remote server editing, and much more. Emacs includes extensive
110 documentation on all aspects of the system, from basic editing to writing
111 large Lisp programs. It has full Unicode support for nearly all human
115 (define-public emacs-no-x-toolkit
116 (package (inherit emacs)
117 (name "emacs-no-x-toolkit")
118 (synopsis "The extensible, customizable, self-documenting text
119 editor (without an X toolkit)" )
120 (inputs (alist-delete "gtk+" (package-inputs emacs)))
122 (substitute-keyword-arguments (package-arguments emacs)
123 ((#:configure-flags flags)
124 `(cons "--with-x-toolkit=no" ,flags))))))
131 (define-public geiser
137 (uri (string-append "mirror://savannah/geiser/" version
138 "/geiser-" version ".tar.gz"))
140 (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5"))))
141 (build-system gnu-build-system)
142 (inputs `(("guile" ,guile-2.0)
144 (home-page "http://nongnu.org/geiser/")
145 (synopsis "Collection of Emacs modes for Guile and Racket hacking")
147 "Geiser is a collection of Emacs major and minor modes that
148 conspire with one or more Scheme interpreters to keep the Lisp Machine
149 Spirit alive. It draws inspiration (and a bit more) from environments
150 such as Common Lisp’s Slime, Factor’s FUEL, Squeak or Emacs itself, and
151 does its best to make Scheme hacking inside Emacs (even more) fun.
153 Or, to be precise, what i consider fun. Geiser is thus my humble
154 contribution to the dynamic school of expression, and a reaction against
155 what i perceive as a derailment, in modern times, of standard Scheme
156 towards the static camp. Because i prefer growing and healing to poking
157 at corpses, the continuously running Scheme interpreter takes the center
158 of the stage in Geiser. A bundle of Elisp shims orchestrates the dialog
159 between the Scheme interpreter, Emacs and, ultimately, the schemer,
160 giving her access to live metadata.")
163 (define-public paredit
169 (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
172 (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8"))))
173 (build-system trivial-build-system)
174 (inputs `(("emacs" ,emacs)))
176 `(#:modules ((guix build utils)
177 (guix build emacs-utils))
180 (use-modules (guix build utils))
181 (use-modules (guix build emacs-utils))
183 (let* ((emacs (string-append (assoc-ref %build-inputs "emacs")
185 (source (assoc-ref %build-inputs "source"))
186 (lisp-dir (string-append %output
187 "/share/emacs/site-lisp"))
188 (target (string-append lisp-dir "/paredit.el")))
190 (copy-file source target)
191 (with-directory-excursion lisp-dir
192 (parameterize ((%emacs emacs))
193 (emacs-batch-eval '(byte-compile-file "paredit.el"))))))))
194 (home-page "http://mumble.net/~campbell/emacs/paredit/")
195 (synopsis "Emacs minor mode for editing parentheses")
197 "ParEdit (paredit.el) is a minor mode for performing structured editing
198 of S-expression data. The typical example of this would be Lisp or Scheme
201 ParEdit helps **keep parentheses balanced** and adds many keys for moving
202 S-expressions and moving around in S-expressions. Its behavior can be jarring
203 for those who may want transient periods of unbalanced parentheses, such as
204 when typing parentheses directly or commenting out code line by line.")
213 (uri (string-append "https://github.com/downloads/magit/magit/magit-"
216 (base32 "1a8vvilhd5y5vmlpsh194qpl4qlg0a1brylfscxcacpfp0cmhlzg"))))
217 (build-system gnu-build-system)
218 (native-inputs `(("texinfo" ,texinfo)))
219 (inputs `(("emacs" ,emacs)
221 ("git:gui" ,git "gui")))
223 `(#:modules ((guix build gnu-build-system)
225 (guix build emacs-utils))
226 #:imported-modules ((guix build gnu-build-system)
228 (guix build emacs-utils))
229 #:tests? #f ; no check target
233 (lambda* (#:key outputs #:allow-other-keys)
234 (let ((out (assoc-ref outputs "out")))
235 (substitute* "Makefile"
237 (("/etc") (string-append out "/etc")))))
239 'build 'patch-exec-paths
240 (lambda* (#:key inputs #:allow-other-keys)
241 (let ((git (assoc-ref inputs "git"))
242 (git:gui (assoc-ref inputs "git:gui")))
243 (emacs-substitute-variables "magit.el"
244 ("magit-git-executable" (string-append git "/bin/git"))
245 ("magit-gitk-executable" (string-append git:gui "/bin/gitk")))))
247 (home-page "http://magit.github.io/")
248 (synopsis "Emacs interface for the Git version control system")
250 "With Magit, you can inspect and modify your Git repositories with Emacs.
251 You can review and commit the changes you have made to the tracked files, for
252 example, and you can browse the history of past changes. There is support for
253 cherry picking, reverting, merging, rebasing, and other common Git
262 (define-public emacs-w3m
265 (version "1.4.483+0.20120614")
268 (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
269 version ".orig.tar.gz"))
271 (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx"))))
272 (build-system gnu-build-system)
273 (native-inputs `(("autoconf" ,autoconf)))
274 (inputs `(("w3m" ,w3m)
275 ("imagemagick" ,imagemagick)
278 '(#:modules ((guix build gnu-build-system)
280 (guix build emacs-utils))
281 #:imported-modules ((guix build gnu-build-system)
283 (guix build emacs-utils))
285 (let ((out (assoc-ref %outputs "out")))
286 (list (string-append "--with-lispdir="
287 out "/share/emacs/site-lisp")
288 (string-append "--with-icondir="
289 out "/share/images/emacs-w3m")))
290 #:tests? #f ; no check target
293 'configure 'pre-configure
295 (zero? (system* "autoconf")))
297 'build 'patch-exec-paths
298 (lambda* (#:key inputs outputs #:allow-other-keys)
299 (let ((out (assoc-ref outputs "out"))
300 (w3m (assoc-ref inputs "w3m"))
301 (imagemagick (assoc-ref inputs "imagemagick"))
302 (coreutils (assoc-ref inputs "coreutils")))
303 (emacs-substitute-variables "w3m.el"
304 ("w3m-command" (string-append w3m "/bin/w3m"))
305 ("w3m-touch-command" (string-append coreutils "/bin/touch"))
306 ("w3m-image-viewer" (string-append imagemagick "/bin/display"))
307 ("w3m-icon-directory" (string-append out
308 "/share/images/emacs-w3m")))
309 (emacs-substitute-variables "w3m-image.el"
310 ("w3m-imagick-convert-program" (string-append imagemagick
312 ("w3m-imagick-identify-program" (string-append imagemagick
317 (lambda* (#:key outputs #:allow-other-keys)
318 (and (zero? (system* "make" "install" "install-icons"))
319 (with-directory-excursion
320 (string-append (assoc-ref outputs "out")
321 "/share/emacs/site-lisp")
322 (for-each delete-file '("ChangeLog" "ChangeLog.1"))
324 %standard-phases)))))
325 (home-page "http://emacs-w3m.namazu.org/")
326 (synopsis "Simple Web browser for Emacs based on w3m")
328 "emacs-w3m is an emacs interface for the w3m web browser.")
331 (define-public emacs-wget
337 (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_"
338 version ".orig.tar.gz"))
340 (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff"))))
341 (build-system gnu-build-system)
342 (inputs `(("wget" ,wget)
345 '(#:modules ((guix build gnu-build-system)
347 (guix build emacs-utils))
348 #:imported-modules ((guix build gnu-build-system)
350 (guix build emacs-utils))
351 #:tests? #f ; no check target
355 (lambda* (#:key outputs #:allow-other-keys)
356 (substitute* "Makefile"
357 (("/usr/local") (assoc-ref outputs "out"))
358 (("/site-lisp/emacs-wget") "/site-lisp")))
360 'build 'patch-exec-paths
361 (lambda* (#:key inputs outputs #:allow-other-keys)
362 (let ((wget (assoc-ref inputs "wget")))
363 (emacs-substitute-variables "wget.el"
364 ("wget-command" (string-append wget "/bin/wget")))))
366 (home-page "http://www.emacswiki.org/emacs/EmacsWget")
367 (synopsis "Simple file downloader for Emacs based on wget")
369 "emacs-wget is an emacs interface for the wget file downloader.")