1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2013, 2014 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 linux)
38 #:use-module (gnu packages version-control)
39 #:use-module (gnu packages imagemagick)
40 #:use-module (gnu packages w3m)
41 #:use-module (gnu packages wget)
42 #:use-module (gnu packages autotools)
43 #:use-module ((gnu packages compression) #:prefix compression:)
44 #:use-module (gnu packages xml)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages acl)
47 #:use-module (guix utils)
48 #:use-module (srfi srfi-1))
56 (uri (string-append "mirror://gnu/emacs/emacs-"
60 "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7"))))
61 (build-system gnu-build-system)
63 '(#:phases (alist-cons-before
64 'configure 'fix-/bin/pwd
66 ;; Use `pwd', not `/bin/pwd'.
67 (substitute* (find-files "." "^Makefile\\.in$")
75 ;; TODO: Add the optional dependencies.
81 ("libjpeg" ,libjpeg-8)
84 ;; When looking for libpng `configure' links with `-lpng -lz', so we
85 ;; must also provide zlib as an input.
87 ("zlib" ,compression:zlib)
93 ("alsa-lib" ,alsa-lib)
96 `(("pkg-config" ,pkg-config)
97 ("texinfo" ,texinfo)))
98 (home-page "http://www.gnu.org/software/emacs/")
99 (synopsis "The extensible, customizable, self-documenting text editor")
101 "GNU Emacs is an extensible and highly customizable text editor. It is
102 based on an Emacs Lisp interpreter with extensions for text editing. Emacs
103 has been extended in essentially all areas of computing, giving rise to a
104 vast array of packages supporting, e.g., email, IRC and XMPP messaging,
105 spreadsheets, remote server editing, and much more. Emacs includes extensive
106 documentation on all aspects of the system, from basic editing to writing
107 large Lisp programs. It has full Unicode support for nearly all human
111 (define-public emacs-no-x-toolkit
112 (package (inherit emacs)
113 (location (source-properties->location (current-source-location)))
114 (name "emacs-no-x-toolkit")
115 (synopsis "The extensible, customizable, self-documenting text
116 editor (without an X toolkit)" )
117 (inputs (append `(("inotify-tools" ,inotify-tools))
118 (alist-delete "gtk+" (package-inputs emacs))))
119 (arguments (append '(#:configure-flags '("--with-x-toolkit=no"))
120 (package-arguments emacs)))))
127 (define-public geiser
133 (uri (string-append "mirror://savannah/geiser/" version
134 "/geiser-" version ".tar.gz"))
136 (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5"))))
137 (build-system gnu-build-system)
138 (inputs `(("guile" ,guile-2.0)
140 (home-page "http://nongnu.org/geiser/")
141 (synopsis "Collection of Emacs modes for Guile and Racket hacking")
143 "Geiser is a collection of Emacs major and minor modes that
144 conspire with one or more Scheme interpreters to keep the Lisp Machine
145 Spirit alive. It draws inspiration (and a bit more) from environments
146 such as Common Lisp’s Slime, Factor’s FUEL, Squeak or Emacs itself, and
147 does its best to make Scheme hacking inside Emacs (even more) fun.
149 Or, to be precise, what i consider fun. Geiser is thus my humble
150 contribution to the dynamic school of expression, and a reaction against
151 what i perceive as a derailment, in modern times, of standard Scheme
152 towards the static camp. Because i prefer growing and healing to poking
153 at corpses, the continuously running Scheme interpreter takes the center
154 of the stage in Geiser. A bundle of Elisp shims orchestrates the dialog
155 between the Scheme interpreter, Emacs and, ultimately, the schemer,
156 giving her access to live metadata.")
159 (define-public paredit
165 (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
168 (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8"))))
169 (build-system trivial-build-system)
170 (inputs `(("emacs" ,emacs)))
172 `(#:modules ((guix build utils)
173 (guix build emacs-utils))
176 (use-modules (guix build utils))
177 (use-modules (guix build emacs-utils))
179 (let* ((emacs (string-append (assoc-ref %build-inputs "emacs")
181 (source (assoc-ref %build-inputs "source"))
182 (lisp-dir (string-append %output
183 "/share/emacs/site-lisp"))
184 (target (string-append lisp-dir "/paredit.el")))
186 (copy-file source target)
187 (with-directory-excursion lisp-dir
188 (parameterize ((%emacs emacs))
189 (emacs-batch-eval '(byte-compile-file "paredit.el"))))))))
190 (home-page "http://mumble.net/~campbell/emacs/paredit/")
191 (synopsis "Emacs minor mode for editing parentheses")
193 "ParEdit (paredit.el) is a minor mode for performing structured editing
194 of S-expression data. The typical example of this would be Lisp or Scheme
197 ParEdit helps **keep parentheses balanced** and adds many keys for moving
198 S-expressions and moving around in S-expressions. Its behavior can be jarring
199 for those who may want transient periods of unbalanced parentheses, such as
200 when typing parentheses directly or commenting out code line by line.")
210 "https://github.com/magit/magit/releases/download/"
211 version "/" name "-" version ".tar.gz"))
213 (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr"))))
214 (build-system gnu-build-system)
215 (native-inputs `(("texinfo" ,texinfo)))
216 (inputs `(("emacs" ,emacs)
218 ("git:gui" ,git "gui")))
220 `(#:modules ((guix build gnu-build-system)
222 (guix build emacs-utils))
223 #:imported-modules ((guix build gnu-build-system)
225 (guix build emacs-utils))
226 #:tests? #f ; no check target
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 (substitute* "Makefile"
234 (("/etc") (string-append out "/etc")))))
236 'build 'patch-exec-paths
237 (lambda* (#:key inputs #:allow-other-keys)
238 (let ((git (assoc-ref inputs "git"))
239 (git:gui (assoc-ref inputs "git:gui")))
240 (emacs-substitute-variables "magit.el"
241 ("magit-git-executable" (string-append git "/bin/git"))
242 ("magit-gitk-executable" (string-append git:gui "/bin/gitk")))))
244 (home-page "http://magit.github.io/")
245 (synopsis "Emacs interface for the Git version control system")
247 "With Magit, you can inspect and modify your Git repositories with Emacs.
248 You can review and commit the changes you have made to the tracked files, for
249 example, and you can browse the history of past changes. There is support for
250 cherry picking, reverting, merging, rebasing, and other common Git
259 (define-public emacs-w3m
262 (version "1.4.483+0.20120614")
265 (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
266 version ".orig.tar.gz"))
268 (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx"))))
269 (build-system gnu-build-system)
270 (native-inputs `(("autoconf" ,autoconf)))
271 (inputs `(("w3m" ,w3m)
272 ("imagemagick" ,imagemagick)
275 '(#:modules ((guix build gnu-build-system)
277 (guix build emacs-utils))
278 #:imported-modules ((guix build gnu-build-system)
280 (guix build emacs-utils))
282 (let ((out (assoc-ref %outputs "out")))
283 (list (string-append "--with-lispdir="
284 out "/share/emacs/site-lisp")
285 (string-append "--with-icondir="
286 out "/share/images/emacs-w3m")))
287 #:tests? #f ; no check target
290 'configure 'pre-configure
292 (zero? (system* "autoconf")))
294 'build 'patch-exec-paths
295 (lambda* (#:key inputs outputs #:allow-other-keys)
296 (let ((out (assoc-ref outputs "out"))
297 (w3m (assoc-ref inputs "w3m"))
298 (imagemagick (assoc-ref inputs "imagemagick"))
299 (coreutils (assoc-ref inputs "coreutils")))
300 (emacs-substitute-variables "w3m.el"
301 ("w3m-command" (string-append w3m "/bin/w3m"))
302 ("w3m-touch-command" (string-append coreutils "/bin/touch"))
303 ("w3m-image-viewer" (string-append imagemagick "/bin/display"))
304 ("w3m-icon-directory" (string-append out
305 "/share/images/emacs-w3m")))
306 (emacs-substitute-variables "w3m-image.el"
307 ("w3m-imagick-convert-program" (string-append imagemagick
309 ("w3m-imagick-identify-program" (string-append imagemagick
314 (lambda* (#:key outputs #:allow-other-keys)
315 (and (zero? (system* "make" "install" "install-icons"))
316 (with-directory-excursion
317 (string-append (assoc-ref outputs "out")
318 "/share/emacs/site-lisp")
319 (for-each delete-file '("ChangeLog" "ChangeLog.1"))
321 %standard-phases)))))
322 (home-page "http://emacs-w3m.namazu.org/")
323 (synopsis "Simple Web browser for Emacs based on w3m")
325 "Emacs-w3m is an emacs interface for the w3m web browser.")
328 (define-public emacs-wget
334 (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_"
335 version ".orig.tar.gz"))
337 (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff"))))
338 (build-system gnu-build-system)
339 (inputs `(("wget" ,wget)
342 '(#:modules ((guix build gnu-build-system)
344 (guix build emacs-utils))
345 #:imported-modules ((guix build gnu-build-system)
347 (guix build emacs-utils))
348 #:tests? #f ; no check target
352 (lambda* (#:key outputs #:allow-other-keys)
353 (substitute* "Makefile"
354 (("/usr/local") (assoc-ref outputs "out"))
355 (("/site-lisp/emacs-wget") "/site-lisp")))
357 'build 'patch-exec-paths
358 (lambda* (#:key inputs outputs #:allow-other-keys)
359 (let ((wget (assoc-ref inputs "wget")))
360 (emacs-substitute-variables "wget.el"
361 ("wget-command" (string-append wget "/bin/wget")))))
363 (home-page "http://www.emacswiki.org/emacs/EmacsWget")
364 (synopsis "Simple file downloader for Emacs based on wget")
366 "Emacs-wget is an emacs interface for the wget file downloader.")