summary refs log tree commit diff
path: root/gnu/packages/emacs.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/emacs.scm')
-rw-r--r--gnu/packages/emacs.scm196
1 files changed, 141 insertions, 55 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 297d174b5e..435ccd1503 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -23,11 +23,14 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages gnutls)
@@ -56,14 +59,15 @@
 (define-public emacs
   (package
     (name "emacs")
-    (version "24.4")
+    (version "24.5")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/emacs/emacs-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7"))))
+               "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
+             (patches (list (search-patch "emacs-exec-path.patch")))))
     (build-system glib-or-gtk-build-system)
     (arguments
      '(#:phases (alist-cons-before
@@ -92,6 +96,7 @@
        ("libpng" ,libpng)
        ("zlib" ,zlib)
 
+       ("librsvg" ,librsvg)
        ("libxpm" ,libxpm)
        ("libxml2" ,libxml2)
        ("libice" ,libice)
@@ -126,7 +131,7 @@ editor (console only)")
     (inputs (fold alist-delete
                   (package-inputs emacs)
                   '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg"
-                    "libpng" "libxpm" "libice" "libsm"
+                    "libpng" "librsvg" "libxpm" "libice" "libsm"
 
                     ;; D-Bus depends on libx11, so remove it as well.
                     "dbus")))))
@@ -143,6 +148,35 @@ editor (without an X toolkit)" )
     (arguments (append '(#:configure-flags '("--with-x-toolkit=no"))
                        (package-arguments emacs)))))
 
+(define-public guile-emacs
+  (package (inherit emacs)
+    (name "guile-emacs")
+    (version "20150512.41120e0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://git.hcoop.net/git/bpt/emacs.git")
+                    (commit "41120e0f595b16387eebfbf731fff70481de1b4b")))
+              (sha256
+               (base32
+                "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6"))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("guile" ,guile-for-guile-emacs)
+       ,@(package-native-inputs emacs)))
+    (arguments
+     (substitute-keyword-arguments `(;; Build fails if we allow parallel build.
+                                     #:parallel-build? #f
+                                     ;; Tests aren't passing for now.
+                                     #:tests? #f
+                                     ,@(package-arguments emacs))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'autogen
+                      (lambda _
+                        (zero? (system* "sh" "autogen.sh"))))))))))
+
 
 ;;;
 ;;; Emacs hacking.
@@ -151,13 +185,14 @@ editor (without an X toolkit)" )
 (define-public geiser
   (package
     (name "geiser")
-    (version "0.6")
+    (version "0.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://savannah/geiser/" version
                                  "/geiser-" version ".tar.gz"))
              (sha256
-              (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5"))))
+              (base32
+               "0cp7r91ibw45yw9k3fz1s13y7ryfsxjgpk57qv37qsznb9lmqylx"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-cons-after
@@ -173,20 +208,12 @@ editor (without an X toolkit)" )
     (home-page "http://nongnu.org/geiser/")
     (synopsis "Collection of Emacs modes for Guile and Racket hacking")
     (description
-     "Geiser is a collection of Emacs major and minor modes that
-conspire with one or more Scheme interpreters to keep the Lisp Machine
-Spirit alive.  It draws inspiration (and a bit more) from environments
-such as Common Lisp’s Slime, Factor’s FUEL, Squeak or Emacs itself, and
-does its best to make Scheme hacking inside Emacs (even more) fun.
-
-Or, to be precise, what i consider fun.  Geiser is thus my humble
-contribution to the dynamic school of expression, and a reaction against
-what i perceive as a derailment, in modern times, of standard Scheme
-towards the static camp.  Because i prefer growing and healing to poking
-at corpses, the continuously running Scheme interpreter takes the center
-of the stage in Geiser.  A bundle of Elisp shims orchestrates the dialog
-between the Scheme interpreter, Emacs and, ultimately, the schemer,
-giving her access to live metadata.")
+     "Geiser is a collection of Emacs major and minor modes that conspire with
+one or more Scheme implementations to keep the Lisp Machine Spirit alive.  The
+continuously running Scheme interpreter takes the center of the stage in
+Geiser.  A bundle of Elisp shims orchestrates the dialog between the Scheme
+implementation, Emacs and, ultimately, the schemer, giving them access to live
+metadata.")
     (license license:bsd-3)))
 
 (define-public paredit
@@ -234,53 +261,115 @@ for those who may want transient periods of unbalanced parentheses, such as
 when typing parentheses directly or commenting out code line by line.")
     (license license:gpl3+)))
 
+(define-public git-modes
+  (package
+    (name "git-modes")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/magit/git-modes/archive/"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1biiss75bswx4alk85k3g9p0a3q3sc9i74h4mnrxc2rsk2iwhws0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+       #:imported-modules (,@%gnu-build-system-modules
+                           (guix build emacs-utils))
+
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out"))
+                          ;; Don't put .el files in a 'git-modes'
+                          ;; sub-directory.
+                          (string-append "LISPDIR="
+                                         (assoc-ref %outputs "out")
+                                         "/share/emacs/site-lisp"))
+       #:test-target "test"
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'install 'emacs-autoloads
+                             (lambda* (#:key outputs #:allow-other-keys)
+                               (let* ((out  (assoc-ref outputs "out"))
+                                      (lisp (string-append
+                                             out "/share/emacs/site-lisp/")))
+                                 (emacs-generate-autoloads ,name lisp)))))))
+    (native-inputs `(("emacs" ,emacs-no-x)))
+    (home-page "https://github.com/magit/git-modes")
+    (synopsis "Emacs major modes for Git configuration files")
+    (description
+     "This package provides Emacs major modes for editing various Git
+configuration files, such as .gitattributes, .gitignore, and .git/config.")
+    (license license:gpl3+)))
+
 (define-public magit
   (package
     (name "magit")
-    (version "1.2.1")
+    (version "1.4.1")
     (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://github.com/magit/magit/releases/download/"
                    version "/" name "-" version ".tar.gz"))
              (sha256
-              (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr"))))
+              (base32
+               "0bbvz6cma5vj6qxx9v2m60zqkjwgwjrdf9kp04iacybvrcm8vcg7"))))
     (build-system gnu-build-system)
-    (native-inputs `(("texinfo" ,texinfo)))
-    (inputs `(("emacs" ,emacs-no-x)
-              ("git" ,git)
+    (native-inputs `(("texinfo" ,texinfo)
+                     ("emacs" ,emacs-no-x)))
+    (inputs `(("git" ,git)
               ("git:gui" ,git "gui")))
+    (propagated-inputs `(("git-modes" ,git-modes)))
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (guix build emacs-utils))
-       #:imported-modules ((guix build gnu-build-system)
-                           (guix build utils)
+       #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
-       #:tests? #f  ; no check target
+
+       #:test-target "test"
+       #:tests? #f                          ;'tests/magit-tests.el' is missing
+
+       #:make-flags (list
+                     ;; Don't put .el files in a sub-directory.
+                     (string-append "lispdir=" (assoc-ref %outputs "out")
+                                    "/share/emacs/site-lisp"))
+
        #:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key outputs #:allow-other-keys)
-          (let ((out (assoc-ref outputs "out")))
-            (substitute* "Makefile"
-              (("/usr/local") out)
-              (("/etc") (string-append out "/etc")))))
-        (alist-cons-before
-         'build 'patch-exec-paths
-         (lambda* (#:key inputs #:allow-other-keys)
-           (let ((git (assoc-ref inputs "git"))
-                 (git:gui (assoc-ref inputs "git:gui")))
-             (emacs-substitute-variables "magit.el"
-               ("magit-git-executable" (string-append git "/bin/git"))
-               ("magit-gitk-executable" (string-append git:gui "/bin/gitk")))))
-         (alist-cons-after
+       (modify-phases %standard-phases
+         (replace
+          'configure
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (substitute* "Makefile"
+                (("/usr/local") out)
+                (("/etc") (string-append out "/etc"))))))
+         (add-before
+          'build 'patch-exec-paths
+          (lambda* (#:key inputs #:allow-other-keys)
+            (let ((git (assoc-ref inputs "git"))
+                  (git:gui (assoc-ref inputs "git:gui")))
+              (emacs-substitute-variables "magit.el"
+                ("magit-git-executable" (string-append git "/bin/git"))
+                ("magit-gitk-executable" (string-append git:gui
+                                                        "/bin/gitk"))))))
+         (add-before
+          'build 'augment-load-path
+          (lambda* (#:key inputs #:allow-other-keys)
+            ;; Allow git-commit-mode.el & co. to be found.
+            (let ((git-modes (assoc-ref inputs "git-modes")))
+              (setenv "EMACSLOADPATH"
+                      (string-append ":" git-modes "/share/emacs/site-lisp"))
+              #t)))
+         (add-after
           'install 'post-install
           (lambda* (#:key outputs #:allow-other-keys)
             (emacs-generate-autoloads
              ,name (string-append (assoc-ref outputs "out")
-                                  "/share/emacs/site-lisp/")))
-          %standard-phases)))))
+                                  "/share/emacs/site-lisp/")))))))
     (home-page "http://magit.github.io/")
     (synopsis "Emacs interface for the Git version control system")
     (description
@@ -312,11 +401,10 @@ operations.")
               ("imagemagick" ,imagemagick)
               ("emacs" ,emacs-no-x)))
     (arguments
-     '(#:modules ((guix build gnu-build-system)
+     `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (guix build emacs-utils))
-       #:imported-modules ((guix build gnu-build-system)
-                           (guix build utils)
+       #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
        #:configure-flags
        (let ((out (assoc-ref %outputs "out")))
@@ -380,11 +468,10 @@ operations.")
     (inputs `(("wget" ,wget)
               ("emacs" ,emacs-no-x)))
     (arguments
-     '(#:modules ((guix build gnu-build-system)
+     `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (guix build emacs-utils))
-       #:imported-modules ((guix build gnu-build-system)
-                           (guix build utils)
+       #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
        #:tests? #f  ; no check target
        #:phases
@@ -448,11 +535,10 @@ operations.")
                    (string-append "all: " rest " emms-print-metadata\n"))))))
     (build-system gnu-build-system)
     (arguments
-     '(#:modules ((guix build gnu-build-system)
+     `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (guix build emacs-utils))
-       #:imported-modules ((guix build gnu-build-system)
-                           (guix build utils)
+       #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
 
        #:phases (alist-replace