aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2017-02-18 11:24:41 +0300
committerAlex Kost <alezost@gmail.com>2017-02-27 16:44:58 +0300
commit59d04f63dfe8b68906e4cccc60ca27cbd546db78 (patch)
treeb2ae4e4831b647bd2ae8b5f25d82fec85dcde87d
parent7994250fdb7ce786a72278554d85fccb6d152e73 (diff)
downloadguix-59d04f63dfe8b68906e4cccc60ca27cbd546db78.tar
guix-59d04f63dfe8b68906e4cccc60ca27cbd546db78.tar.gz
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.
-rw-r--r--Makefile.am1
-rw-r--r--gnu/packages/aux-files/emacs/guix-emacs.el (renamed from emacs/guix-emacs.el)0
-rw-r--r--gnu/packages/emacs.scm20
3 files changed, 9 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 2e048f99ae..ec1bd2eb8b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -198,6 +198,7 @@ dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
# Auxiliary files for packages.
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-x86_64.conf \
gnu/packages/aux-files/linux-libre/4.9-i686.conf \
diff --git a/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el
index 099261a013..099261a013 100644
--- a/emacs/guix-emacs.el
+++ b/gnu/packages/aux-files/emacs/guix-emacs.el
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 863624fc0f..3e722c326b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -133,19 +133,15 @@
(("/bin/pwd")
"pwd"))))
(add-after 'install 'install-site-start
- ;; Copy guix-emacs.el from Guix and add it to site-start.el. This
- ;; way, Emacs packages provided by Guix and installed in
+ ;; Use 'guix-emacs' in "site-start.el". This way, Emacs packages
+ ;; provided by Guix and installed in
;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSION are
;; automatically found.
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((guix-src (assoc-ref inputs "guix-src"))
- (out (assoc-ref outputs "out"))
- (lisp-dir (string-append out "/share/emacs/site-lisp"))
- (unpack (assoc-ref %standard-phases 'unpack)))
- (mkdir "guix")
- (with-directory-excursion "guix"
- (apply unpack (list #:source guix-src))
- (install-file "emacs/guix-emacs.el" lisp-dir))
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dir (string-append out "/share/emacs/site-lisp")))
+ (copy-file (assoc-ref inputs "guix-emacs.el")
+ (string-append lisp-dir "/guix-emacs.el"))
(with-output-to-file (string-append lisp-dir "/site-start.el")
(lambda ()
(display "(require 'guix-emacs nil t)")))
@@ -175,13 +171,13 @@
("libsm" ,libsm)
("alsa-lib" ,alsa-lib)
("dbus" ,dbus)
- ("guix-src" ,(package-source guix))
;; multilingualization support
("libotf" ,libotf)
("m17n-lib" ,m17n-lib)))
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
+ ("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(native-search-paths