gnu: emacs: Move "guix-emacs.el" to "aux-files".

* emacs/guix-emacs.el: Rename to...
* gnu/packages/aux-files/emacs/guix-emacs.el: ... this.
* Makefile.am (AUX_FILES): Add it.
* gnu/packages/emacs.scm (emacs)[inputs]: Remove 'guix' source.
[native-inputs]: Add "guix-emacs.el" auxiliary file.
[arguments]: Adjust 'install-site-start' phase accordingly.
This commit is contained in:
Alex Kost 2017-02-18 11:24:41 +03:00
parent 7994250fdb
commit 59d04f63df
No known key found for this signature in database
GPG Key ID: 82460C082A0EE98F
3 changed files with 9 additions and 12 deletions

View File

@ -198,6 +198,7 @@ dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
# Auxiliary files for packages. # Auxiliary files for packages.
AUX_FILES = \ AUX_FILES = \
gnu/packages/aux-files/emacs/guix-emacs.el \
gnu/packages/aux-files/linux-libre/4.10-i686.conf \ gnu/packages/aux-files/linux-libre/4.10-i686.conf \
gnu/packages/aux-files/linux-libre/4.10-x86_64.conf \ gnu/packages/aux-files/linux-libre/4.10-x86_64.conf \
gnu/packages/aux-files/linux-libre/4.9-i686.conf \ gnu/packages/aux-files/linux-libre/4.9-i686.conf \

View File

@ -133,19 +133,15 @@
(("/bin/pwd") (("/bin/pwd")
"pwd")))) "pwd"))))
(add-after 'install 'install-site-start (add-after 'install 'install-site-start
;; Copy guix-emacs.el from Guix and add it to site-start.el. This ;; Use 'guix-emacs' in "site-start.el". This way, Emacs packages
;; way, Emacs packages provided by Guix and installed in ;; provided by Guix and installed in
;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSION are ;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSION are
;; automatically found. ;; automatically found.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((guix-src (assoc-ref inputs "guix-src")) (let* ((out (assoc-ref outputs "out"))
(out (assoc-ref outputs "out")) (lisp-dir (string-append out "/share/emacs/site-lisp")))
(lisp-dir (string-append out "/share/emacs/site-lisp")) (copy-file (assoc-ref inputs "guix-emacs.el")
(unpack (assoc-ref %standard-phases 'unpack))) (string-append lisp-dir "/guix-emacs.el"))
(mkdir "guix")
(with-directory-excursion "guix"
(apply unpack (list #:source guix-src))
(install-file "emacs/guix-emacs.el" lisp-dir))
(with-output-to-file (string-append lisp-dir "/site-start.el") (with-output-to-file (string-append lisp-dir "/site-start.el")
(lambda () (lambda ()
(display "(require 'guix-emacs nil t)"))) (display "(require 'guix-emacs nil t)")))
@ -175,13 +171,13 @@
("libsm" ,libsm) ("libsm" ,libsm)
("alsa-lib" ,alsa-lib) ("alsa-lib" ,alsa-lib)
("dbus" ,dbus) ("dbus" ,dbus)
("guix-src" ,(package-source guix))
;; multilingualization support ;; multilingualization support
("libotf" ,libotf) ("libotf" ,libotf)
("m17n-lib" ,m17n-lib))) ("m17n-lib" ,m17n-lib)))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config) `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
("pkg-config" ,pkg-config)
("texinfo" ,texinfo))) ("texinfo" ,texinfo)))
(native-search-paths (native-search-paths