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 TUBK |
45 | #:use-module (gnu packages glib) |
46 | #:use-module (guix utils) | |
47 | #:use-module (srfi srfi-1)) | |
468bdabb LC |
48 | |
49 | (define-public emacs | |
50 | (package | |
51 | (name "emacs") | |
3be9f724 | 52 | (version "24.3") |
468bdabb LC |
53 | (source (origin |
54 | (method url-fetch) | |
55 | (uri (string-append "mirror://gnu/emacs/emacs-" | |
3be9f724 | 56 | version ".tar.xz")) |
468bdabb LC |
57 | (sha256 |
58 | (base32 | |
01eafd38 LC |
59 | "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh")) |
60 | (patches (list (search-patch "emacs-configure-sh.patch"))))) | |
468bdabb LC |
61 | (build-system gnu-build-system) |
62 | (arguments | |
63 | '(#:configure-flags | |
64 | (list (string-append "--with-crt-dir=" (assoc-ref %build-inputs "libc") | |
504a83af | 65 | "/lib")) |
468bdabb LC |
66 | #:phases (alist-cons-before |
67 | 'configure 'fix-/bin/pwd | |
68 | (lambda _ | |
69 | ;; Use `pwd', not `/bin/pwd'. | |
70 | (substitute* (find-files "." "^Makefile\\.in$") | |
71 | (("/bin/pwd") | |
72 | "pwd"))) | |
73 | %standard-phases))) | |
74 | (inputs | |
c4c4cc05 | 75 | `(("gnutls" ,gnutls) |
468bdabb LC |
76 | ("ncurses" ,ncurses) |
77 | ||
78 | ;; TODO: Add the optional dependencies. | |
50efa797 | 79 | ("xlibs" ,libx11) |
0a9e9a63 | 80 | ("gtk+" ,gtk+) |
50efa797 LC |
81 | ("libXft" ,libxft) |
82 | ("libtiff" ,libtiff) | |
504a83af | 83 | ("giflib" ,giflib) |
50efa797 LC |
84 | ("libjpeg" ,libjpeg-8) |
85 | ||
86 | ;; When looking for libpng `configure' links with `-lpng -lz', so we | |
87 | ;; must also provide zlib as an input. | |
88 | ("libpng" ,libpng) | |
89 | ("zlib" ,compression:zlib) | |
90 | ||
91 | ("libXpm" ,libxpm) | |
92 | ("libxml2" ,libxml2) | |
504a83af MW |
93 | ("libice" ,libice) |
94 | ("libsm" ,libsm) | |
95 | ("alsa-lib" ,alsa-lib) | |
01eafd38 | 96 | ("dbus" ,dbus))) |
c4c4cc05 JD |
97 | (native-inputs |
98 | `(("pkg-config" ,pkg-config) | |
99 | ("texinfo" ,texinfo))) | |
468bdabb | 100 | (home-page "http://www.gnu.org/software/emacs/") |
f50d2669 | 101 | (synopsis "The extensible, customizable, self-documenting text editor") |
468bdabb | 102 | (description |
79c311b8 LC |
103 | "GNU Emacs is an extensible and highly customizable text editor. It is |
104 | based on an Emacs Lisp interpreter with extensions for text editing. Emacs | |
105 | has been extended in essentially all areas of computing, giving rise to a | |
106 | vast array of packages supporting, e.g., email, IRC and XMPP messaging, | |
107 | spreadsheets, remote server editing, and much more. Emacs includes extensive | |
108 | documentation on all aspects of the system, from basic editing to writing | |
109 | large Lisp programs. It has full Unicode support for nearly all human | |
110 | languages.") | |
468bdabb | 111 | (license gpl3+))) |
4f028c8f | 112 | |
4a3e602c TUBK |
113 | (define-public emacs-no-x-toolkit |
114 | (package (inherit emacs) | |
9e771e3b | 115 | (location (source-properties->location (current-source-location))) |
4a3e602c TUBK |
116 | (name "emacs-no-x-toolkit") |
117 | (synopsis "The extensible, customizable, self-documenting text | |
118 | editor (without an X toolkit)" ) | |
119 | (inputs (alist-delete "gtk+" (package-inputs emacs))) | |
120 | (arguments | |
121 | (substitute-keyword-arguments (package-arguments emacs) | |
122 | ((#:configure-flags flags) | |
123 | `(cons "--with-x-toolkit=no" ,flags)))))) | |
124 | ||
4f028c8f LC |
125 | \f |
126 | ;;; | |
127 | ;;; Emacs hacking. | |
128 | ;;; | |
129 | ||
130 | (define-public geiser | |
131 | (package | |
132 | (name "geiser") | |
8991a470 | 133 | (version "0.6") |
4f028c8f LC |
134 | (source (origin |
135 | (method url-fetch) | |
cf8f58b2 LC |
136 | (uri (string-append "mirror://savannah/geiser/" version |
137 | "/geiser-" version ".tar.gz")) | |
4f028c8f | 138 | (sha256 |
8991a470 | 139 | (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5")))) |
4f028c8f LC |
140 | (build-system gnu-build-system) |
141 | (inputs `(("guile" ,guile-2.0) | |
142 | ("emacs" ,emacs))) | |
143 | (home-page "http://nongnu.org/geiser/") | |
144 | (synopsis "Collection of Emacs modes for Guile and Racket hacking") | |
145 | (description | |
146 | "Geiser is a collection of Emacs major and minor modes that | |
147 | conspire with one or more Scheme interpreters to keep the Lisp Machine | |
148 | Spirit alive. It draws inspiration (and a bit more) from environments | |
149 | such as Common Lisp’s Slime, Factor’s FUEL, Squeak or Emacs itself, and | |
150 | does its best to make Scheme hacking inside Emacs (even more) fun. | |
151 | ||
152 | Or, to be precise, what i consider fun. Geiser is thus my humble | |
153 | contribution to the dynamic school of expression, and a reaction against | |
154 | what i perceive as a derailment, in modern times, of standard Scheme | |
155 | towards the static camp. Because i prefer growing and healing to poking | |
156 | at corpses, the continuously running Scheme interpreter takes the center | |
157 | of the stage in Geiser. A bundle of Elisp shims orchestrates the dialog | |
158 | between the Scheme interpreter, Emacs and, ultimately, the schemer, | |
159 | giving her access to live metadata.") | |
160 | (license bsd-3))) | |
9a4c9715 | 161 | |
fe4163f3 MW |
162 | (define-public paredit |
163 | (package | |
164 | (name "paredit") | |
165 | (version "23") | |
166 | (source (origin | |
167 | (method url-fetch) | |
168 | (uri (string-append "http://mumble.net/~campbell/emacs/paredit-" | |
169 | version ".el")) | |
170 | (sha256 | |
171 | (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8")))) | |
172 | (build-system trivial-build-system) | |
173 | (inputs `(("emacs" ,emacs))) | |
174 | (arguments | |
175 | `(#:modules ((guix build utils) | |
176 | (guix build emacs-utils)) | |
177 | #:builder | |
178 | (begin | |
179 | (use-modules (guix build utils)) | |
180 | (use-modules (guix build emacs-utils)) | |
181 | ||
182 | (let* ((emacs (string-append (assoc-ref %build-inputs "emacs") | |
183 | "/bin/emacs")) | |
184 | (source (assoc-ref %build-inputs "source")) | |
185 | (lisp-dir (string-append %output | |
186 | "/share/emacs/site-lisp")) | |
187 | (target (string-append lisp-dir "/paredit.el"))) | |
188 | (mkdir-p lisp-dir) | |
189 | (copy-file source target) | |
190 | (with-directory-excursion lisp-dir | |
191 | (parameterize ((%emacs emacs)) | |
192 | (emacs-batch-eval '(byte-compile-file "paredit.el")))))))) | |
193 | (home-page "http://mumble.net/~campbell/emacs/paredit/") | |
194 | (synopsis "Emacs minor mode for editing parentheses") | |
195 | (description | |
196 | "ParEdit (paredit.el) is a minor mode for performing structured editing | |
197 | of S-expression data. The typical example of this would be Lisp or Scheme | |
198 | source code. | |
199 | ||
200 | ParEdit helps **keep parentheses balanced** and adds many keys for moving | |
201 | S-expressions and moving around in S-expressions. Its behavior can be jarring | |
202 | for those who may want transient periods of unbalanced parentheses, such as | |
203 | when typing parentheses directly or commenting out code line by line.") | |
204 | (license gpl3+))) | |
205 | ||
9a4c9715 MW |
206 | (define-public magit |
207 | (package | |
208 | (name "magit") | |
fac8b30b | 209 | (version "1.2.1") |
9a4c9715 MW |
210 | (source (origin |
211 | (method url-fetch) | |
fac8b30b MW |
212 | (uri (string-append |
213 | "https://github.com/magit/magit/releases/download/" | |
214 | version "/" name "-" version ".tar.gz")) | |
9a4c9715 | 215 | (sha256 |
fac8b30b | 216 | (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr")))) |
9a4c9715 MW |
217 | (build-system gnu-build-system) |
218 | (native-inputs `(("texinfo" ,texinfo))) | |
219 | (inputs `(("emacs" ,emacs) | |
220 | ("git" ,git) | |
221 | ("git:gui" ,git "gui"))) | |
222 | (arguments | |
223 | `(#:modules ((guix build gnu-build-system) | |
224 | (guix build utils) | |
225 | (guix build emacs-utils)) | |
226 | #:imported-modules ((guix build gnu-build-system) | |
227 | (guix build utils) | |
228 | (guix build emacs-utils)) | |
229 | #:tests? #f ; no check target | |
230 | #:phases | |
231 | (alist-replace | |
232 | 'configure | |
233 | (lambda* (#:key outputs #:allow-other-keys) | |
234 | (let ((out (assoc-ref outputs "out"))) | |
235 | (substitute* "Makefile" | |
236 | (("/usr/local") out) | |
237 | (("/etc") (string-append out "/etc"))))) | |
238 | (alist-cons-before | |
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"))))) | |
246 | %standard-phases)))) | |
247 | (home-page "http://magit.github.io/") | |
248 | (synopsis "Emacs interface for the Git version control system") | |
249 | (description | |
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 | |
254 | operations.") | |
255 | (license gpl3+))) | |
18d26210 MW |
256 | |
257 | \f | |
258 | ;;; | |
259 | ;;; Web browsing. | |
260 | ;;; | |
261 | ||
262 | (define-public emacs-w3m | |
263 | (package | |
264 | (name "emacs-w3m") | |
265 | (version "1.4.483+0.20120614") | |
266 | (source (origin | |
267 | (method url-fetch) | |
268 | (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_" | |
269 | version ".orig.tar.gz")) | |
270 | (sha256 | |
271 | (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx")))) | |
272 | (build-system gnu-build-system) | |
273 | (native-inputs `(("autoconf" ,autoconf))) | |
274 | (inputs `(("w3m" ,w3m) | |
275 | ("imagemagick" ,imagemagick) | |
276 | ("emacs" ,emacs))) | |
277 | (arguments | |
278 | '(#:modules ((guix build gnu-build-system) | |
279 | (guix build utils) | |
280 | (guix build emacs-utils)) | |
281 | #:imported-modules ((guix build gnu-build-system) | |
282 | (guix build utils) | |
283 | (guix build emacs-utils)) | |
284 | #:configure-flags | |
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 | |
291 | #:phases | |
292 | (alist-cons-before | |
293 | 'configure 'pre-configure | |
294 | (lambda _ | |
295 | (zero? (system* "autoconf"))) | |
296 | (alist-cons-before | |
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 | |
311 | "/bin/convert")) | |
312 | ("w3m-imagick-identify-program" (string-append imagemagick | |
313 | "/bin/identify"))) | |
314 | #t)) | |
315 | (alist-replace | |
316 | 'install | |
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")) | |
323 | #t))) | |
324 | %standard-phases))))) | |
325 | (home-page "http://emacs-w3m.namazu.org/") | |
326 | (synopsis "Simple Web browser for Emacs based on w3m") | |
327 | (description | |
328 | "emacs-w3m is an emacs interface for the w3m web browser.") | |
329 | (license gpl2+))) | |
89925972 MW |
330 | |
331 | (define-public emacs-wget | |
332 | (package | |
333 | (name "emacs-wget") | |
334 | (version "0.5.0") | |
335 | (source (origin | |
336 | (method url-fetch) | |
337 | (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_" | |
338 | version ".orig.tar.gz")) | |
339 | (sha256 | |
340 | (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff")))) | |
341 | (build-system gnu-build-system) | |
342 | (inputs `(("wget" ,wget) | |
343 | ("emacs" ,emacs))) | |
344 | (arguments | |
345 | '(#:modules ((guix build gnu-build-system) | |
346 | (guix build utils) | |
347 | (guix build emacs-utils)) | |
348 | #:imported-modules ((guix build gnu-build-system) | |
349 | (guix build utils) | |
350 | (guix build emacs-utils)) | |
351 | #:tests? #f ; no check target | |
352 | #:phases | |
353 | (alist-replace | |
354 | 'configure | |
355 | (lambda* (#:key outputs #:allow-other-keys) | |
356 | (substitute* "Makefile" | |
357 | (("/usr/local") (assoc-ref outputs "out")) | |
358 | (("/site-lisp/emacs-wget") "/site-lisp"))) | |
359 | (alist-cons-before | |
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"))))) | |
365 | %standard-phases)))) | |
366 | (home-page "http://www.emacswiki.org/emacs/EmacsWget") | |
ae2189a9 | 367 | (synopsis "Simple file downloader for Emacs based on wget") |
89925972 MW |
368 | (description |
369 | "emacs-wget is an emacs interface for the wget file downloader.") | |
370 | (license gpl2+))) |