distro: Change the module name space to (gnu ...).
[jackhill/guix/guix.git] / gnu / packages / emacs.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages emacs)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (distro)
25 #:use-module (gnu packages ncurses)
26 #:use-module (gnu packages texinfo)
27 #:use-module (gnu packages gnutls)
28 #:use-module (gnu packages pkg-config))
29
30 (define-public emacs
31 (package
32 (name "emacs")
33 (version "24.2")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "mirror://gnu/emacs/emacs-"
37 version ".tar.bz2"))
38 (sha256
39 (base32
40 "13wbjfjmz13qpjwssy44nw2230lllmkkgjsy0rqfm6am2cf87n3k"))))
41 (build-system gnu-build-system)
42 (arguments
43 '(#:configure-flags
44 (list (string-append "--with-crt-dir=" (assoc-ref %build-inputs "libc")
45 "/lib"))
46 #:patches (list (assoc-ref %build-inputs "patch/epaths"))
47 #:phases (alist-cons-before
48 'configure 'fix-/bin/pwd
49 (lambda _
50 ;; Use `pwd', not `/bin/pwd'.
51 (substitute* (find-files "." "^Makefile\\.in$")
52 (("/bin/pwd")
53 "pwd")))
54 %standard-phases)))
55 (inputs
56 `(("pkg-config" ,pkg-config)
57 ("gnutls" ,gnutls)
58 ("texinfo" ,texinfo)
59 ("ncurses" ,ncurses)
60
61 ;; TODO: Add the optional dependencies.
62 ;; ("xlibs" ,xlibs)
63 ;; ("gtk+" ,gtk+)
64 ;; ("libXft" ,libXft)
65 ;; ("libtiff" ,libtiff)
66 ;; ("libungif" ,libungif)
67 ;; ("libjpeg" ,libjpeg)
68 ;; ("libpng" ,libpng)
69 ;; ("libXpm" ,libXpm)
70 ;; ("libxml2" ,libxml2)
71 ;; ("dbus-library" ,dbus-library)
72
73 ("patch/epaths" ,(search-patch "emacs-configure-sh.patch"))
74 ))
75 (home-page "http://www.gnu.org/software/emacs/")
76 (synopsis
77 "GNU Emacs 24, the extensible, customizable text editor")
78 (description
79 "GNU Emacs is an extensible, customizable text editor—and more. At its
80 core is an interpreter for Emacs Lisp, a dialect of the Lisp
81 programming language with extensions to support text editing.
82
83 The features of GNU Emacs include: content-sensitive editing modes,
84 including syntax coloring, for a wide variety of file types including
85 plain text, source code, and HTML; complete built-in documentation,
86 including a tutorial for new users; full Unicode support for nearly all
87 human languages and their scripts; highly customizable, using Emacs
88 Lisp code or a graphical interface; a large number of extensions that
89 add other functionality, including a project planner, mail and news
90 reader, debugger interface, calendar, and more. Many of these
91 extensions are distributed with GNU Emacs; others are available
92 separately.")
93 (license gpl3+)))