all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 3/5] gnu: emacs: Move "guix-emacs.el" to "aux-files".
Date: Sat, 18 Feb 2017 12:21:43 +0300	[thread overview]
Message-ID: <20170218092145.28459-4-alezost@gmail.com> (raw)
In-Reply-To: <20170218092145.28459-1-alezost@gmail.com>

* 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.
---
 Makefile.am                                          |  1 +
 .../packages/aux-files/emacs}/guix-emacs.el          |  0
 gnu/packages/emacs.scm                               | 20 ++++++++------------
 3 files changed, 9 insertions(+), 12 deletions(-)
 rename {emacs => gnu/packages/aux-files/emacs}/guix-emacs.el (100%)

diff --git a/Makefile.am b/Makefile.am
index 1e26da8..0ee4438 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.9-i686.conf	\
   gnu/packages/aux-files/linux-libre/4.9-x86_64.conf	\
   gnu/packages/aux-files/linux-libre/4.4-i686.conf	\
diff --git a/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el
similarity index 100%
rename from emacs/guix-emacs.el
rename to gnu/packages/aux-files/emacs/guix-emacs.el
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 04c7a08..51a579a 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
-- 
2.10.2

  parent reply	other threads:[~2017-02-18  9:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18  9:21 [PATCH 0/5] gnu/packages/aux-files Alex Kost
2017-02-18  9:21 ` [PATCH 1/5] packages: Add 'search-auxiliary-file' Alex Kost
2017-02-18  9:21 ` [PATCH 2/5] gnu: linux: Move configuration files to "aux-files" Alex Kost
2017-02-18  9:21 ` Alex Kost [this message]
2017-02-18  9:21 ` [PATCH 4/5] gnu: emacs: Simplify "guix-emacs.el" Alex Kost
2017-02-18  9:21 ` [PATCH 5/5] .gitignore: Remove stale entries Alex Kost
2017-02-27 13:46 ` [PATCH 0/5] gnu/packages/aux-files Alex Kost
2017-02-27 15:07   ` Ricardo Wurmus
2017-02-28 14:01     ` Alex Kost
2017-03-06 15:50   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170218092145.28459-4-alezost@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.