Commit | Line | Data |
---|---|---|
468bdabb | 1 | ;;; GNU Guix --- Functional package management for GNU |
4a3e602c | 2 | ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> |
9e771e3b | 3 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
9a4c9715 | 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
468bdabb LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
1ffa7090 | 21 | (define-module (gnu packages emacs) |
468bdabb LC |
22 | #:use-module (guix licenses) |
23 | #:use-module (guix packages) | |
24 | #:use-module (guix download) | |
25 | #:use-module (guix build-system gnu) | |
fe4163f3 | 26 | #:use-module (guix build-system trivial) |
59a43334 | 27 | #:use-module (gnu packages) |
7abe1965 | 28 | #:use-module (gnu packages gtk) |
1ffa7090 LC |
29 | #:use-module (gnu packages ncurses) |
30 | #:use-module (gnu packages texinfo) | |
31 | #:use-module (gnu packages gnutls) | |
4f028c8f | 32 | #:use-module (gnu packages pkg-config) |
50efa797 LC |
33 | #:use-module (gnu packages guile) |
34 | #:use-module (gnu packages xorg) | |
35 | #:use-module (gnu packages lesstif) | |
e55354b8 | 36 | #:use-module (gnu packages image) |
504a83af | 37 | #:use-module (gnu packages linux) |
9a4c9715 | 38 | #:use-module (gnu packages version-control) |
18d26210 MW |
39 | #:use-module (gnu packages imagemagick) |
40 | #:use-module (gnu packages w3m) | |
89925972 | 41 | #:use-module (gnu packages wget) |
18d26210 | 42 | #:use-module (gnu packages autotools) |
b5b73a82 | 43 | #:use-module ((gnu packages compression) #:prefix compression:) |
50efa797 | 44 | #:use-module (gnu packages xml) |
4a3e602c | 45 | #:use-module (gnu packages glib) |
388fd01b | 46 | #:use-module (gnu packages acl) |
4a3e602c TUBK |
47 | #:use-module (guix utils) |
48 | #:use-module (srfi srfi-1)) | |
468bdabb LC |
49 | |
50 | (define-public emacs | |
51 | (package | |
52 | (name "emacs") | |
388fd01b | 53 | (version "24.4") |
468bdabb LC |
54 | (source (origin |
55 | (method url-fetch) | |
56 | (uri (string-append "mirror://gnu/emacs/emacs-" | |
3be9f724 | 57 | version ".tar.xz")) |
468bdabb LC |
58 | (sha256 |
59 | (base32 | |
388fd01b | 60 | "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7")))) |
468bdabb LC |
61 | (build-system gnu-build-system) |
62 | (arguments | |
388fd01b | 63 | '(#:phases (alist-cons-before |
468bdabb LC |
64 | 'configure 'fix-/bin/pwd |
65 | (lambda _ | |
66 | ;; Use `pwd', not `/bin/pwd'. | |
67 | (substitute* (find-files "." "^Makefile\\.in$") | |
68 | (("/bin/pwd") | |
69 | "pwd"))) | |
70 | %standard-phases))) | |
71 | (inputs | |
c4c4cc05 | 72 | `(("gnutls" ,gnutls) |
468bdabb LC |
73 | ("ncurses" ,ncurses) |
74 | ||
75 | ;; TODO: Add the optional dependencies. | |
50efa797 | 76 | ("xlibs" ,libx11) |
0a9e9a63 | 77 | ("gtk+" ,gtk+) |
50efa797 LC |
78 | ("libXft" ,libxft) |
79 | ("libtiff" ,libtiff) | |
504a83af | 80 | ("giflib" ,giflib) |
50efa797 | 81 | ("libjpeg" ,libjpeg-8) |
388fd01b | 82 | ("acl" ,acl) |
50efa797 LC |
83 | |
84 | ;; When looking for libpng `configure' links with `-lpng -lz', so we | |
85 | ;; must also provide zlib as an input. | |
86 | ("libpng" ,libpng) | |
87 | ("zlib" ,compression:zlib) | |
88 | ||
89 | ("libXpm" ,libxpm) | |
90 | ("libxml2" ,libxml2) | |
504a83af MW |
91 | ("libice" ,libice) |
92 | ("libsm" ,libsm) | |
93 | ("alsa-lib" ,alsa-lib) | |
01eafd38 | 94 | ("dbus" ,dbus))) |
c4c4cc05 JD |
95 | (native-inputs |
96 | `(("pkg-config" ,pkg-config) | |
97 | ("texinfo" ,texinfo))) | |
468bdabb | 98 | (home-page "http://www.gnu.org/software/emacs/") |
f50d2669 | 99 | (synopsis "The extensible, customizable, self-documenting text editor") |
468bdabb | 100 | (description |
79c311b8 LC |
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 | |
108 | languages.") | |
468bdabb | 109 | (license gpl3+))) |
4f028c8f | 110 | |
4a3e602c TUBK |
111 | (define-public emacs-no-x-toolkit |
112 | (package (inherit emacs) | |
9e771e3b | 113 | (location (source-properties->location (current-source-location))) |
4a3e602c TUBK |
114 | (name "emacs-no-x-toolkit") |
115 | (synopsis "The extensible, customizable, self-documenting text | |
116 | editor (without an X toolkit)" ) | |
388fd01b MW |
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))))) | |
4a3e602c | 121 | |
4f028c8f LC |
122 | \f |
123 | ;;; | |
124 | ;;; Emacs hacking. | |
125 | ;;; | |
126 | ||
127 | (define-public geiser | |
128 | (package | |
129 | (name "geiser") | |
8991a470 | 130 | (version "0.6") |
4f028c8f LC |
131 | (source (origin |
132 | (method url-fetch) | |
cf8f58b2 LC |
133 | (uri (string-append "mirror://savannah/geiser/" version |
134 | "/geiser-" version ".tar.gz")) | |
4f028c8f | 135 | (sha256 |
8991a470 | 136 | (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5")))) |
4f028c8f LC |
137 | (build-system gnu-build-system) |
138 | (inputs `(("guile" ,guile-2.0) | |
139 | ("emacs" ,emacs))) | |
140 | (home-page "http://nongnu.org/geiser/") | |
141 | (synopsis "Collection of Emacs modes for Guile and Racket hacking") | |
142 | (description | |
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. | |
148 | ||
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.") | |
157 | (license bsd-3))) | |
9a4c9715 | 158 | |
fe4163f3 MW |
159 | (define-public paredit |
160 | (package | |
161 | (name "paredit") | |
162 | (version "23") | |
163 | (source (origin | |
164 | (method url-fetch) | |
165 | (uri (string-append "http://mumble.net/~campbell/emacs/paredit-" | |
166 | version ".el")) | |
167 | (sha256 | |
168 | (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8")))) | |
169 | (build-system trivial-build-system) | |
170 | (inputs `(("emacs" ,emacs))) | |
171 | (arguments | |
172 | `(#:modules ((guix build utils) | |
173 | (guix build emacs-utils)) | |
174 | #:builder | |
175 | (begin | |
176 | (use-modules (guix build utils)) | |
177 | (use-modules (guix build emacs-utils)) | |
178 | ||
179 | (let* ((emacs (string-append (assoc-ref %build-inputs "emacs") | |
180 | "/bin/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"))) | |
185 | (mkdir-p lisp-dir) | |
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") | |
192 | (description | |
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 | |
195 | source code. | |
196 | ||
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.") | |
201 | (license gpl3+))) | |
202 | ||
9a4c9715 MW |
203 | (define-public magit |
204 | (package | |
205 | (name "magit") | |
fac8b30b | 206 | (version "1.2.1") |
9a4c9715 MW |
207 | (source (origin |
208 | (method url-fetch) | |
fac8b30b MW |
209 | (uri (string-append |
210 | "https://github.com/magit/magit/releases/download/" | |
211 | version "/" name "-" version ".tar.gz")) | |
9a4c9715 | 212 | (sha256 |
fac8b30b | 213 | (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr")))) |
9a4c9715 MW |
214 | (build-system gnu-build-system) |
215 | (native-inputs `(("texinfo" ,texinfo))) | |
216 | (inputs `(("emacs" ,emacs) | |
217 | ("git" ,git) | |
218 | ("git:gui" ,git "gui"))) | |
219 | (arguments | |
220 | `(#:modules ((guix build gnu-build-system) | |
221 | (guix build utils) | |
222 | (guix build emacs-utils)) | |
223 | #:imported-modules ((guix build gnu-build-system) | |
224 | (guix build utils) | |
225 | (guix build emacs-utils)) | |
226 | #:tests? #f ; no check target | |
227 | #:phases | |
228 | (alist-replace | |
229 | 'configure | |
230 | (lambda* (#:key outputs #:allow-other-keys) | |
231 | (let ((out (assoc-ref outputs "out"))) | |
232 | (substitute* "Makefile" | |
233 | (("/usr/local") out) | |
234 | (("/etc") (string-append out "/etc"))))) | |
235 | (alist-cons-before | |
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"))))) | |
243 | %standard-phases)))) | |
244 | (home-page "http://magit.github.io/") | |
245 | (synopsis "Emacs interface for the Git version control system") | |
246 | (description | |
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 | |
251 | operations.") | |
252 | (license gpl3+))) | |
18d26210 MW |
253 | |
254 | \f | |
255 | ;;; | |
256 | ;;; Web browsing. | |
257 | ;;; | |
258 | ||
259 | (define-public emacs-w3m | |
260 | (package | |
261 | (name "emacs-w3m") | |
262 | (version "1.4.483+0.20120614") | |
263 | (source (origin | |
264 | (method url-fetch) | |
265 | (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_" | |
266 | version ".orig.tar.gz")) | |
267 | (sha256 | |
268 | (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx")))) | |
269 | (build-system gnu-build-system) | |
270 | (native-inputs `(("autoconf" ,autoconf))) | |
271 | (inputs `(("w3m" ,w3m) | |
272 | ("imagemagick" ,imagemagick) | |
273 | ("emacs" ,emacs))) | |
274 | (arguments | |
275 | '(#:modules ((guix build gnu-build-system) | |
276 | (guix build utils) | |
277 | (guix build emacs-utils)) | |
278 | #:imported-modules ((guix build gnu-build-system) | |
279 | (guix build utils) | |
280 | (guix build emacs-utils)) | |
281 | #:configure-flags | |
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 | |
288 | #:phases | |
289 | (alist-cons-before | |
290 | 'configure 'pre-configure | |
291 | (lambda _ | |
292 | (zero? (system* "autoconf"))) | |
293 | (alist-cons-before | |
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 | |
308 | "/bin/convert")) | |
309 | ("w3m-imagick-identify-program" (string-append imagemagick | |
310 | "/bin/identify"))) | |
311 | #t)) | |
312 | (alist-replace | |
313 | 'install | |
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")) | |
320 | #t))) | |
321 | %standard-phases))))) | |
322 | (home-page "http://emacs-w3m.namazu.org/") | |
323 | (synopsis "Simple Web browser for Emacs based on w3m") | |
324 | (description | |
35b9e423 | 325 | "Emacs-w3m is an emacs interface for the w3m web browser.") |
18d26210 | 326 | (license gpl2+))) |
89925972 MW |
327 | |
328 | (define-public emacs-wget | |
329 | (package | |
330 | (name "emacs-wget") | |
331 | (version "0.5.0") | |
332 | (source (origin | |
333 | (method url-fetch) | |
334 | (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_" | |
335 | version ".orig.tar.gz")) | |
336 | (sha256 | |
337 | (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff")))) | |
338 | (build-system gnu-build-system) | |
339 | (inputs `(("wget" ,wget) | |
340 | ("emacs" ,emacs))) | |
341 | (arguments | |
342 | '(#:modules ((guix build gnu-build-system) | |
343 | (guix build utils) | |
344 | (guix build emacs-utils)) | |
345 | #:imported-modules ((guix build gnu-build-system) | |
346 | (guix build utils) | |
347 | (guix build emacs-utils)) | |
348 | #:tests? #f ; no check target | |
349 | #:phases | |
350 | (alist-replace | |
351 | 'configure | |
352 | (lambda* (#:key outputs #:allow-other-keys) | |
353 | (substitute* "Makefile" | |
354 | (("/usr/local") (assoc-ref outputs "out")) | |
355 | (("/site-lisp/emacs-wget") "/site-lisp"))) | |
356 | (alist-cons-before | |
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"))))) | |
362 | %standard-phases)))) | |
363 | (home-page "http://www.emacswiki.org/emacs/EmacsWget") | |
ae2189a9 | 364 | (synopsis "Simple file downloader for Emacs based on wget") |
89925972 | 365 | (description |
35b9e423 | 366 | "Emacs-wget is an emacs interface for the wget file downloader.") |
89925972 | 367 | (license gpl2+))) |