diff mbox

[2/2] gnu: gettext: Install Emacs tools.

Message ID 20160925081046.18523-3-alezost@gmail.com
State New
Headers show

Commit Message

Alex Kost Sept. 25, 2016, 8:10 a.m. UTC
Fixes <http://bugs.gnu.org/24442>.
Reported by Ivan Vilata i Balaguer <ivan@selidor.net>.

* gnu/packages/gettext.scm (gnu-gettext)[native-inputs]: Add 'emacs'.
[arguments]: Add 'add-emacs-autoloads' phase.
---
 gnu/packages/gettext.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès Sept. 27, 2016, 12:25 p.m. UTC | #1
Alex Kost <alezost@gmail.com> skribis:

> Fixes <http://bugs.gnu.org/24442>.
> Reported by Ivan Vilata i Balaguer <ivan@selidor.net>.
>
> * gnu/packages/gettext.scm (gnu-gettext)[native-inputs]: Add 'emacs'.
> [arguments]: Add 'add-emacs-autoloads' phase.

LGTM, thank you!

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index a5767dd..26ab677 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -3,6 +3,7 @@ 
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,9 +28,11 @@ 
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages emacs)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages tex)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (guix utils))
 
 (define-public gettext-minimal
   (package
@@ -103,6 +106,19 @@  translated messages from the catalogs.  Nearly all GNU packages use Gettext.")
   (package
     (inherit gettext-minimal)
     (name "gettext")
+    (arguments
+     (substitute-keyword-arguments (package-arguments gettext-minimal)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'install 'add-emacs-autoloads
+             (lambda* (#:key outputs #:allow-other-keys)
+               ;; Make 'po-mode' and other things available by default.
+               (with-directory-excursion
+                   (string-append (assoc-ref outputs "out")
+                                  "/share/emacs/site-lisp")
+                 (symlink "start-po.el" "gettext-autoloads.el")
+                 #t)))))))
+    (native-inputs `(("emacs" ,emacs-minimal))) ; for Emacs tools
     (synopsis "Tools and documentation for translation")))
 
 (define-public po4a