Commit | Line | Data |
---|---|---|
468bdabb | 1 | ;;; GNU Guix --- Functional package management for GNU |
4a3e602c | 2 | ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> |
c72aed6d | 3 | ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
9a4c9715 | 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
d51cafb0 | 5 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
468bdabb LC |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
1ffa7090 | 22 | (define-module (gnu packages emacs) |
f61e0e79 | 23 | #:use-module ((guix licenses) #:prefix license:) |
468bdabb LC |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system gnu) | |
71f57158 | 27 | #:use-module (guix build-system glib-or-gtk) |
fe4163f3 | 28 | #:use-module (guix build-system trivial) |
59a43334 | 29 | #:use-module (gnu packages) |
7abe1965 | 30 | #:use-module (gnu packages gtk) |
1ffa7090 LC |
31 | #:use-module (gnu packages ncurses) |
32 | #:use-module (gnu packages texinfo) | |
33 | #:use-module (gnu packages gnutls) | |
4f028c8f | 34 | #:use-module (gnu packages pkg-config) |
50efa797 LC |
35 | #:use-module (gnu packages guile) |
36 | #:use-module (gnu packages xorg) | |
37 | #:use-module (gnu packages lesstif) | |
e55354b8 | 38 | #:use-module (gnu packages image) |
504a83af | 39 | #:use-module (gnu packages linux) |
9a4c9715 | 40 | #:use-module (gnu packages version-control) |
18d26210 MW |
41 | #:use-module (gnu packages imagemagick) |
42 | #:use-module (gnu packages w3m) | |
89925972 | 43 | #:use-module (gnu packages wget) |
18d26210 | 44 | #:use-module (gnu packages autotools) |
f61e0e79 | 45 | #:use-module (gnu packages compression) |
50efa797 | 46 | #:use-module (gnu packages xml) |
4a3e602c | 47 | #:use-module (gnu packages glib) |
388fd01b | 48 | #:use-module (gnu packages acl) |
77c9286d LC |
49 | #:use-module (gnu packages perl) |
50 | #:use-module (gnu packages linux) ;alsa | |
51 | #:use-module (gnu packages xiph) | |
52 | #:use-module (gnu packages mp3) | |
4a3e602c TUBK |
53 | #:use-module (guix utils) |
54 | #:use-module (srfi srfi-1)) | |
468bdabb LC |
55 | |
56 | (define-public emacs | |
57 | (package | |
58 | (name "emacs") | |
388fd01b | 59 | (version "24.4") |
468bdabb LC |
60 | (source (origin |
61 | (method url-fetch) | |
62 | (uri (string-append "mirror://gnu/emacs/emacs-" | |
3be9f724 | 63 | version ".tar.xz")) |
468bdabb LC |
64 | (sha256 |
65 | (base32 | |
388fd01b | 66 | "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7")))) |
71f57158 | 67 | (build-system glib-or-gtk-build-system) |
468bdabb | 68 | (arguments |
388fd01b | 69 | '(#:phases (alist-cons-before |
468bdabb LC |
70 | 'configure 'fix-/bin/pwd |
71 | (lambda _ | |
72 | ;; Use `pwd', not `/bin/pwd'. | |
73 | (substitute* (find-files "." "^Makefile\\.in$") | |
74 | (("/bin/pwd") | |
75 | "pwd"))) | |
76 | %standard-phases))) | |
77 | (inputs | |
c4c4cc05 | 78 | `(("gnutls" ,gnutls) |
468bdabb LC |
79 | ("ncurses" ,ncurses) |
80 | ||
81 | ;; TODO: Add the optional dependencies. | |
fa275717 | 82 | ("libx11" ,libx11) |
0a9e9a63 | 83 | ("gtk+" ,gtk+) |
fa275717 | 84 | ("libxft" ,libxft) |
50efa797 | 85 | ("libtiff" ,libtiff) |
504a83af | 86 | ("giflib" ,giflib) |
50efa797 | 87 | ("libjpeg" ,libjpeg-8) |
388fd01b | 88 | ("acl" ,acl) |
50efa797 LC |
89 | |
90 | ;; When looking for libpng `configure' links with `-lpng -lz', so we | |
91 | ;; must also provide zlib as an input. | |
92 | ("libpng" ,libpng) | |
f61e0e79 | 93 | ("zlib" ,zlib) |
50efa797 | 94 | |
fa275717 | 95 | ("libxpm" ,libxpm) |
50efa797 | 96 | ("libxml2" ,libxml2) |
504a83af MW |
97 | ("libice" ,libice) |
98 | ("libsm" ,libsm) | |
99 | ("alsa-lib" ,alsa-lib) | |
01eafd38 | 100 | ("dbus" ,dbus))) |
c4c4cc05 JD |
101 | (native-inputs |
102 | `(("pkg-config" ,pkg-config) | |
103 | ("texinfo" ,texinfo))) | |
468bdabb | 104 | (home-page "http://www.gnu.org/software/emacs/") |
f50d2669 | 105 | (synopsis "The extensible, customizable, self-documenting text editor") |
468bdabb | 106 | (description |
79c311b8 LC |
107 | "GNU Emacs is an extensible and highly customizable text editor. It is |
108 | based on an Emacs Lisp interpreter with extensions for text editing. Emacs | |
109 | has been extended in essentially all areas of computing, giving rise to a | |
110 | vast array of packages supporting, e.g., email, IRC and XMPP messaging, | |
111 | spreadsheets, remote server editing, and much more. Emacs includes extensive | |
112 | documentation on all aspects of the system, from basic editing to writing | |
113 | large Lisp programs. It has full Unicode support for nearly all human | |
114 | languages.") | |
f61e0e79 | 115 | (license license:gpl3+))) |
4f028c8f | 116 | |
4fd540b7 LC |
117 | (define-public emacs-no-x |
118 | ;; This is the version that you should use as an input to packages that just | |
119 | ;; need to byte-compile .el files. | |
120 | (package (inherit emacs) | |
121 | (location (source-properties->location (current-source-location))) | |
122 | (name "emacs-no-x") | |
123 | (synopsis "The extensible, customizable, self-documenting text | |
124 | editor (console only)") | |
125 | (build-system gnu-build-system) | |
126 | (inputs (fold alist-delete | |
127 | (package-inputs emacs) | |
128 | '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" | |
129 | "libpng" "libxpm" "libice" "libsm" | |
130 | ||
131 | ;; D-Bus depends on libx11, so remove it as well. | |
132 | "dbus"))))) | |
133 | ||
4a3e602c TUBK |
134 | (define-public emacs-no-x-toolkit |
135 | (package (inherit emacs) | |
9e771e3b | 136 | (location (source-properties->location (current-source-location))) |
4a3e602c TUBK |
137 | (name "emacs-no-x-toolkit") |
138 | (synopsis "The extensible, customizable, self-documenting text | |
139 | editor (without an X toolkit)" ) | |
71f57158 | 140 | (build-system gnu-build-system) |
388fd01b MW |
141 | (inputs (append `(("inotify-tools" ,inotify-tools)) |
142 | (alist-delete "gtk+" (package-inputs emacs)))) | |
143 | (arguments (append '(#:configure-flags '("--with-x-toolkit=no")) | |
144 | (package-arguments emacs))))) | |
4a3e602c | 145 | |
4f028c8f LC |
146 | \f |
147 | ;;; | |
148 | ;;; Emacs hacking. | |
149 | ;;; | |
150 | ||
151 | (define-public geiser | |
152 | (package | |
153 | (name "geiser") | |
1f8ad12a | 154 | (version "0.7") |
4f028c8f LC |
155 | (source (origin |
156 | (method url-fetch) | |
cf8f58b2 LC |
157 | (uri (string-append "mirror://savannah/geiser/" version |
158 | "/geiser-" version ".tar.gz")) | |
4f028c8f | 159 | (sha256 |
1f8ad12a LC |
160 | (base32 |
161 | "0cp7r91ibw45yw9k3fz1s13y7ryfsxjgpk57qv37qsznb9lmqylx")))) | |
4f028c8f | 162 | (build-system gnu-build-system) |
d51cafb0 AK |
163 | (arguments |
164 | '(#:phases (alist-cons-after | |
165 | 'install 'post-install | |
166 | (lambda* (#:key outputs #:allow-other-keys) | |
167 | (symlink "geiser-install.el" | |
168 | (string-append (assoc-ref outputs "out") | |
169 | "/share/emacs/site-lisp/" | |
170 | "geiser-autoloads.el"))) | |
171 | %standard-phases))) | |
4f028c8f | 172 | (inputs `(("guile" ,guile-2.0) |
2d32d153 | 173 | ("emacs" ,emacs-no-x))) |
4f028c8f LC |
174 | (home-page "http://nongnu.org/geiser/") |
175 | (synopsis "Collection of Emacs modes for Guile and Racket hacking") | |
176 | (description | |
9586011d LC |
177 | "Geiser is a collection of Emacs major and minor modes that conspire with |
178 | one or more Scheme implementations to keep the Lisp Machine Spirit alive. The | |
179 | continuously running Scheme interpreter takes the center of the stage in | |
180 | Geiser. A bundle of Elisp shims orchestrates the dialog between the Scheme | |
181 | implementation, Emacs and, ultimately, the schemer, giving them access to live | |
182 | metadata.") | |
f61e0e79 | 183 | (license license:bsd-3))) |
9a4c9715 | 184 | |
fe4163f3 MW |
185 | (define-public paredit |
186 | (package | |
187 | (name "paredit") | |
188 | (version "23") | |
189 | (source (origin | |
190 | (method url-fetch) | |
191 | (uri (string-append "http://mumble.net/~campbell/emacs/paredit-" | |
192 | version ".el")) | |
193 | (sha256 | |
194 | (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8")))) | |
195 | (build-system trivial-build-system) | |
2d32d153 | 196 | (inputs `(("emacs" ,emacs-no-x))) |
fe4163f3 MW |
197 | (arguments |
198 | `(#:modules ((guix build utils) | |
199 | (guix build emacs-utils)) | |
200 | #:builder | |
201 | (begin | |
202 | (use-modules (guix build utils)) | |
203 | (use-modules (guix build emacs-utils)) | |
204 | ||
205 | (let* ((emacs (string-append (assoc-ref %build-inputs "emacs") | |
206 | "/bin/emacs")) | |
207 | (source (assoc-ref %build-inputs "source")) | |
208 | (lisp-dir (string-append %output | |
209 | "/share/emacs/site-lisp")) | |
210 | (target (string-append lisp-dir "/paredit.el"))) | |
211 | (mkdir-p lisp-dir) | |
212 | (copy-file source target) | |
213 | (with-directory-excursion lisp-dir | |
214 | (parameterize ((%emacs emacs)) | |
d51cafb0 | 215 | (emacs-generate-autoloads ,name lisp-dir) |
fe4163f3 MW |
216 | (emacs-batch-eval '(byte-compile-file "paredit.el")))))))) |
217 | (home-page "http://mumble.net/~campbell/emacs/paredit/") | |
218 | (synopsis "Emacs minor mode for editing parentheses") | |
219 | (description | |
220 | "ParEdit (paredit.el) is a minor mode for performing structured editing | |
221 | of S-expression data. The typical example of this would be Lisp or Scheme | |
222 | source code. | |
223 | ||
224 | ParEdit helps **keep parentheses balanced** and adds many keys for moving | |
225 | S-expressions and moving around in S-expressions. Its behavior can be jarring | |
226 | for those who may want transient periods of unbalanced parentheses, such as | |
227 | when typing parentheses directly or commenting out code line by line.") | |
f61e0e79 | 228 | (license license:gpl3+))) |
fe4163f3 | 229 | |
9a4c9715 MW |
230 | (define-public magit |
231 | (package | |
232 | (name "magit") | |
fac8b30b | 233 | (version "1.2.1") |
9a4c9715 MW |
234 | (source (origin |
235 | (method url-fetch) | |
fac8b30b MW |
236 | (uri (string-append |
237 | "https://github.com/magit/magit/releases/download/" | |
238 | version "/" name "-" version ".tar.gz")) | |
9a4c9715 | 239 | (sha256 |
fac8b30b | 240 | (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr")))) |
9a4c9715 MW |
241 | (build-system gnu-build-system) |
242 | (native-inputs `(("texinfo" ,texinfo))) | |
2d32d153 | 243 | (inputs `(("emacs" ,emacs-no-x) |
9a4c9715 MW |
244 | ("git" ,git) |
245 | ("git:gui" ,git "gui"))) | |
246 | (arguments | |
247 | `(#:modules ((guix build gnu-build-system) | |
248 | (guix build utils) | |
249 | (guix build emacs-utils)) | |
250 | #:imported-modules ((guix build gnu-build-system) | |
251 | (guix build utils) | |
252 | (guix build emacs-utils)) | |
253 | #:tests? #f ; no check target | |
254 | #:phases | |
255 | (alist-replace | |
256 | 'configure | |
257 | (lambda* (#:key outputs #:allow-other-keys) | |
258 | (let ((out (assoc-ref outputs "out"))) | |
259 | (substitute* "Makefile" | |
260 | (("/usr/local") out) | |
261 | (("/etc") (string-append out "/etc"))))) | |
262 | (alist-cons-before | |
263 | 'build 'patch-exec-paths | |
264 | (lambda* (#:key inputs #:allow-other-keys) | |
265 | (let ((git (assoc-ref inputs "git")) | |
266 | (git:gui (assoc-ref inputs "git:gui"))) | |
267 | (emacs-substitute-variables "magit.el" | |
268 | ("magit-git-executable" (string-append git "/bin/git")) | |
269 | ("magit-gitk-executable" (string-append git:gui "/bin/gitk"))))) | |
d51cafb0 AK |
270 | (alist-cons-after |
271 | 'install 'post-install | |
272 | (lambda* (#:key outputs #:allow-other-keys) | |
273 | (emacs-generate-autoloads | |
274 | ,name (string-append (assoc-ref outputs "out") | |
275 | "/share/emacs/site-lisp/"))) | |
276 | %standard-phases))))) | |
9a4c9715 MW |
277 | (home-page "http://magit.github.io/") |
278 | (synopsis "Emacs interface for the Git version control system") | |
279 | (description | |
280 | "With Magit, you can inspect and modify your Git repositories with Emacs. | |
281 | You can review and commit the changes you have made to the tracked files, for | |
282 | example, and you can browse the history of past changes. There is support for | |
283 | cherry picking, reverting, merging, rebasing, and other common Git | |
284 | operations.") | |
f61e0e79 | 285 | (license license:gpl3+))) |
18d26210 MW |
286 | |
287 | \f | |
288 | ;;; | |
289 | ;;; Web browsing. | |
290 | ;;; | |
291 | ||
292 | (define-public emacs-w3m | |
293 | (package | |
294 | (name "emacs-w3m") | |
295 | (version "1.4.483+0.20120614") | |
296 | (source (origin | |
297 | (method url-fetch) | |
298 | (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_" | |
299 | version ".orig.tar.gz")) | |
300 | (sha256 | |
301 | (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx")))) | |
302 | (build-system gnu-build-system) | |
303 | (native-inputs `(("autoconf" ,autoconf))) | |
304 | (inputs `(("w3m" ,w3m) | |
305 | ("imagemagick" ,imagemagick) | |
2d32d153 | 306 | ("emacs" ,emacs-no-x))) |
18d26210 MW |
307 | (arguments |
308 | '(#:modules ((guix build gnu-build-system) | |
309 | (guix build utils) | |
310 | (guix build emacs-utils)) | |
311 | #:imported-modules ((guix build gnu-build-system) | |
312 | (guix build utils) | |
313 | (guix build emacs-utils)) | |
314 | #:configure-flags | |
315 | (let ((out (assoc-ref %outputs "out"))) | |
316 | (list (string-append "--with-lispdir=" | |
317 | out "/share/emacs/site-lisp") | |
318 | (string-append "--with-icondir=" | |
319 | out "/share/images/emacs-w3m"))) | |
320 | #:tests? #f ; no check target | |
321 | #:phases | |
722ec722 MW |
322 | (alist-cons-after |
323 | 'unpack 'autoconf | |
18d26210 MW |
324 | (lambda _ |
325 | (zero? (system* "autoconf"))) | |
326 | (alist-cons-before | |
327 | 'build 'patch-exec-paths | |
328 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
329 | (let ((out (assoc-ref outputs "out")) | |
330 | (w3m (assoc-ref inputs "w3m")) | |
331 | (imagemagick (assoc-ref inputs "imagemagick")) | |
332 | (coreutils (assoc-ref inputs "coreutils"))) | |
333 | (emacs-substitute-variables "w3m.el" | |
334 | ("w3m-command" (string-append w3m "/bin/w3m")) | |
335 | ("w3m-touch-command" (string-append coreutils "/bin/touch")) | |
336 | ("w3m-image-viewer" (string-append imagemagick "/bin/display")) | |
337 | ("w3m-icon-directory" (string-append out | |
338 | "/share/images/emacs-w3m"))) | |
339 | (emacs-substitute-variables "w3m-image.el" | |
340 | ("w3m-imagick-convert-program" (string-append imagemagick | |
341 | "/bin/convert")) | |
342 | ("w3m-imagick-identify-program" (string-append imagemagick | |
343 | "/bin/identify"))) | |
344 | #t)) | |
345 | (alist-replace | |
346 | 'install | |
347 | (lambda* (#:key outputs #:allow-other-keys) | |
348 | (and (zero? (system* "make" "install" "install-icons")) | |
349 | (with-directory-excursion | |
350 | (string-append (assoc-ref outputs "out") | |
351 | "/share/emacs/site-lisp") | |
352 | (for-each delete-file '("ChangeLog" "ChangeLog.1")) | |
d51cafb0 | 353 | (symlink "w3m-load.el" "w3m-autoloads.el") |
18d26210 MW |
354 | #t))) |
355 | %standard-phases))))) | |
356 | (home-page "http://emacs-w3m.namazu.org/") | |
357 | (synopsis "Simple Web browser for Emacs based on w3m") | |
358 | (description | |
35b9e423 | 359 | "Emacs-w3m is an emacs interface for the w3m web browser.") |
f61e0e79 | 360 | (license license:gpl2+))) |
89925972 MW |
361 | |
362 | (define-public emacs-wget | |
363 | (package | |
364 | (name "emacs-wget") | |
365 | (version "0.5.0") | |
366 | (source (origin | |
367 | (method url-fetch) | |
368 | (uri (string-append "mirror://debian/pool/main/w/wget-el/wget-el_" | |
369 | version ".orig.tar.gz")) | |
370 | (sha256 | |
371 | (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff")))) | |
372 | (build-system gnu-build-system) | |
373 | (inputs `(("wget" ,wget) | |
2d32d153 | 374 | ("emacs" ,emacs-no-x))) |
89925972 MW |
375 | (arguments |
376 | '(#:modules ((guix build gnu-build-system) | |
377 | (guix build utils) | |
378 | (guix build emacs-utils)) | |
379 | #:imported-modules ((guix build gnu-build-system) | |
380 | (guix build utils) | |
381 | (guix build emacs-utils)) | |
382 | #:tests? #f ; no check target | |
383 | #:phases | |
384 | (alist-replace | |
385 | 'configure | |
386 | (lambda* (#:key outputs #:allow-other-keys) | |
387 | (substitute* "Makefile" | |
388 | (("/usr/local") (assoc-ref outputs "out")) | |
389 | (("/site-lisp/emacs-wget") "/site-lisp"))) | |
390 | (alist-cons-before | |
391 | 'build 'patch-exec-paths | |
392 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
393 | (let ((wget (assoc-ref inputs "wget"))) | |
394 | (emacs-substitute-variables "wget.el" | |
395 | ("wget-command" (string-append wget "/bin/wget"))))) | |
d51cafb0 AK |
396 | (alist-cons-after |
397 | 'install 'post-install | |
398 | (lambda* (#:key outputs #:allow-other-keys) | |
399 | (emacs-generate-autoloads | |
400 | "wget" (string-append (assoc-ref outputs "out") | |
401 | "/share/emacs/site-lisp/"))) | |
402 | %standard-phases))))) | |
89925972 | 403 | (home-page "http://www.emacswiki.org/emacs/EmacsWget") |
ae2189a9 | 404 | (synopsis "Simple file downloader for Emacs based on wget") |
89925972 | 405 | (description |
35b9e423 | 406 | "Emacs-wget is an emacs interface for the wget file downloader.") |
f61e0e79 | 407 | (license license:gpl2+))) |
77c9286d LC |
408 | |
409 | \f | |
410 | ;;; | |
411 | ;;; Multimedia. | |
412 | ;;; | |
413 | ||
414 | (define-public emms | |
415 | (package | |
416 | (name "emms") | |
417 | (version "4.0") | |
418 | (source (origin | |
419 | (method url-fetch) | |
420 | (uri (string-append "mirror://gnu/emms/emms-" | |
421 | version ".tar.gz")) | |
422 | (sha256 | |
423 | (base32 | |
424 | "1q0n3iwva8bvai2rl9sm49sdjmk0wi7vajz4knz01l7g67nrp87l")) | |
425 | (modules '((guix build utils))) | |
426 | (snippet | |
427 | '(substitute* "Makefile" | |
428 | (("/usr/bin/install-info") | |
429 | ;; No need to use 'install-info' since it would create a | |
430 | ;; useless 'dir' file. | |
431 | "true") | |
432 | (("^INFODIR=.*") | |
433 | ;; Install Info files to $out/share/info, not $out/info. | |
434 | "INFODIR := $(PREFIX)/share/info\n") | |
435 | (("/site-lisp/emms") | |
436 | ;; Install directly in share/emacs/site-lisp, not in a | |
437 | ;; sub-directory. | |
438 | "/site-lisp") | |
439 | (("^all: (.*)\n" _ rest) | |
440 | ;; Build 'emms-print-metadata'. | |
441 | (string-append "all: " rest " emms-print-metadata\n")))))) | |
442 | (build-system gnu-build-system) | |
443 | (arguments | |
444 | '(#:modules ((guix build gnu-build-system) | |
445 | (guix build utils) | |
446 | (guix build emacs-utils)) | |
447 | #:imported-modules ((guix build gnu-build-system) | |
448 | (guix build utils) | |
449 | (guix build emacs-utils)) | |
450 | ||
451 | #:phases (alist-replace | |
452 | 'configure | |
453 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
454 | (let ((out (assoc-ref outputs "out")) | |
455 | (vorbis (assoc-ref inputs "vorbis-tools")) | |
456 | (alsa (assoc-ref inputs "alsa-utils")) | |
457 | (mpg321 (assoc-ref inputs "mpg321")) | |
458 | (mp3info (assoc-ref inputs "mp3info"))) | |
459 | ;; Specify the installation directory. | |
460 | (substitute* "Makefile" | |
461 | (("PREFIX=.*$") | |
462 | (string-append "PREFIX := " out "\n"))) | |
463 | ||
464 | (setenv "SHELL" (which "sh")) | |
465 | (setenv "CC" "gcc") | |
466 | ||
467 | ;; Specify the absolute file names of the various | |
468 | ;; programs so that everything works out-of-the-box. | |
469 | (with-directory-excursion "lisp" | |
470 | (emacs-substitute-variables | |
471 | "emms-player-mpg321-remote.el" | |
472 | ("emms-player-mpg321-remote-command" | |
473 | (string-append mpg321 "/bin/mpg321"))) | |
474 | (substitute* "emms-player-simple.el" | |
475 | (("\"ogg123\"") | |
476 | (string-append "\"" vorbis "/bin/ogg123\""))) | |
477 | (emacs-substitute-variables "emms-info-ogginfo.el" | |
478 | ("emms-info-ogginfo-program-name" | |
479 | (string-append vorbis "/bin/ogginfo"))) | |
480 | (emacs-substitute-variables "emms-info-libtag.el" | |
481 | ("emms-info-libtag-program-name" | |
482 | (string-append out "/bin/emms-print-metadata"))) | |
2d2a2bac LC |
483 | (emacs-substitute-variables "emms-info-mp3info.el" |
484 | ("emms-info-mp3info-program-name" | |
485 | (string-append mp3info "/bin/mp3info"))) | |
77c9286d LC |
486 | (substitute* "emms-volume-amixer.el" |
487 | (("\"amixer\"") | |
488 | (string-append "\"" alsa "/bin/amixer\""))) | |
489 | (substitute* "emms-tag-editor.el" | |
490 | (("\"mp3info\"") | |
a5f60659 | 491 | (string-append "\"" mp3info "/bin/mp3info\"")))))) |
77c9286d LC |
492 | (alist-cons-before |
493 | 'install 'pre-install | |
494 | (lambda* (#:key outputs #:allow-other-keys) | |
c72aed6d LC |
495 | ;; The 'install' rule expects the target directory to |
496 | ;; exist. | |
77c9286d LC |
497 | (let* ((out (assoc-ref outputs "out")) |
498 | (man1 (string-append out "/share/man/man1"))) | |
499 | (mkdir-p man1) | |
c72aed6d | 500 | #t)) |
77c9286d LC |
501 | (alist-cons-after |
502 | 'install 'post-install | |
503 | (lambda* (#:key outputs #:allow-other-keys) | |
504 | (let* ((out (assoc-ref outputs "out")) | |
505 | (target (string-append | |
506 | out "/bin/emms-print-metadata"))) | |
d51cafb0 AK |
507 | (symlink "emms-auto.el" |
508 | (string-append out "/share/emacs/site-lisp/" | |
509 | "emms-autoloads.el")) | |
77c9286d LC |
510 | (mkdir-p (dirname target)) |
511 | (copy-file "src/emms-print-metadata" target) | |
512 | (chmod target #o555))) | |
513 | %standard-phases))) | |
514 | #:tests? #f)) | |
2d32d153 | 515 | (native-inputs `(("emacs" ,emacs-no-x) ;for (guix build emacs-utils) |
77c9286d | 516 | ("texinfo" ,texinfo))) |
c72aed6d | 517 | (inputs `(("alsa-utils" ,alsa-utils) |
77c9286d LC |
518 | ("vorbis-tools" ,vorbis-tools) |
519 | ("mpg321" ,mpg321) | |
520 | ("taglib" ,taglib) | |
521 | ("mp3info" ,mp3info))) | |
522 | (synopsis "Emacs Multimedia System") | |
523 | (description | |
524 | "EMMS is the Emacs Multimedia System. It is a small front-end which | |
525 | can control one of the supported external players. Thus, it supports | |
526 | whatever formats are supported by your music player. It also | |
527 | supports tagging and playlist management, all behind a clean and | |
528 | light user interface.") | |
529 | (home-page "http://www.gnu.org/software/emms/") | |
f61e0e79 | 530 | (license license:gpl3+))) |
c7e553a3 LC |
531 | |
532 | \f | |
533 | ;;; | |
534 | ;;; Miscellaneous. | |
535 | ;;; | |
536 | ||
537 | (define-public bbdb | |
538 | (package | |
539 | (name "bbdb") | |
540 | (version "3.1.2") | |
541 | (source (origin | |
542 | (method url-fetch) | |
543 | (uri (string-append "mirror://savannah/bbdb/bbdb-" | |
544 | version ".tar.gz")) | |
545 | (sha256 | |
546 | (base32 | |
547 | "1gs16bbpiiy01w9pyg12868r57kx1v3hnw04gmqsmpc40l1hyy05")) | |
548 | (modules '((guix build utils))) | |
549 | (snippet | |
550 | ;; We don't want to build and install the PDF. | |
551 | '(substitute* "doc/Makefile.in" | |
552 | (("^doc_DATA = .*$") | |
553 | "doc_DATA =\n"))))) | |
554 | (build-system gnu-build-system) | |
555 | (arguments | |
556 | '(#:phases (alist-cons-after | |
557 | 'install 'post-install | |
558 | (lambda* (#:key outputs #:allow-other-keys) | |
559 | ;; Add an autoloads file with the right name for guix.el. | |
560 | (let* ((out (assoc-ref outputs "out")) | |
561 | (site (string-append out "/share/emacs/site-lisp"))) | |
562 | (with-directory-excursion site | |
563 | (symlink "bbdb-loaddefs.el" "bbdb-autoloads.el")))) | |
564 | %standard-phases))) | |
2d32d153 | 565 | (native-inputs `(("emacs" ,emacs-no-x))) |
c7e553a3 LC |
566 | (home-page "http://savannah.nongnu.org/projects/bbdb/") |
567 | (synopsis "Contact management utility for Emacs") | |
568 | (description | |
569 | "BBDB is the Insidious Big Brother Database for GNU Emacs. It provides | |
570 | an address book for email and snail mail addresses, phone numbers and the | |
571 | like. It can be linked with various Emacs mail clients (Message and Mail | |
572 | mode, Rmail, Gnus, MH-E, and VM). BBDB is fully customizable.") | |
f61e0e79 | 573 | (license license:gpl3+))) |