summary refs log tree commit diff
path: root/gnu/packages/emacs.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-17 14:12:03 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-17 14:12:15 +0200
commit2f910ef68c1852b32b9ef27535ddbaa7ede3401b (patch)
tree62e96e2e76c907edcf063811e3a5ce9e8373201a /gnu/packages/emacs.scm
parentfb9d7865348755d1f0465202330b63df5ee8abaa (diff)
downloadguix-2f910ef68c1852b32b9ef27535ddbaa7ede3401b.tar.gz
gnu: Add git-modes.
* gnu/packages/emacs.scm (git-modes): New variable.
Diffstat (limited to 'gnu/packages/emacs.scm')
-rw-r--r--gnu/packages/emacs.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 8d3df368b1..a1366efe8f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -230,6 +230,50 @@ 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")