From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Cc: Federico Beffa <beffa@fbengineering.ch>
Subject: [PATCH 3/4] gnu: emacs: Find packages in "~/.guix-profile".
Date: Wed, 6 Jan 2016 19:55:04 +0300 [thread overview]
Message-ID: <1452099305-746-4-git-send-email-alezost@gmail.com> (raw)
In-Reply-To: <1452099305-746-1-git-send-email-alezost@gmail.com>
From: Federico Beffa <beffa@fbengineering.ch>
* gnu/packages/emacs.scm (emacs)[inputs]: Add 'guix-src' input.
[arguments]: Add 'install-site-start' phase.
Co-authored-by: Alex Kost <alezost@gmail.com>
---
gnu/packages/emacs.scm | 49 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 34 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index e82ffd3..54df2ed 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -52,6 +52,7 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages glib)
#:use-module (gnu packages acl)
+ #:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
#:use-module (gnu packages pdf)
#:use-module (gnu packages xiph)
@@ -73,20 +74,37 @@
(patches (list (search-patch "emacs-exec-path.patch")))))
(build-system glib-or-gtk-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-before 'configure 'fix-/bin/pwd
- (lambda _
- ;; Use `pwd', not `/bin/pwd'.
- (substitute* (find-files "." "^Makefile\\.in$")
- (("/bin/pwd")
- "pwd"))))
- (add-after 'install 'remove-info.info
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Remove 'info.info', which is provided by Texinfo.
- (let ((out (assoc-ref outputs "out")))
- (delete-file
- (string-append out "/share/info/info.info.gz"))
- #t))))))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-/bin/pwd
+ (lambda _
+ ;; Use `pwd', not `/bin/pwd'.
+ (substitute* (find-files "." "^Makefile\\.in$")
+ (("/bin/pwd")
+ "pwd"))))
+ (add-after 'install 'remove-info.info
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Remove 'info.info', which is provided by Texinfo.
+ (let ((out (assoc-ref outputs "out")))
+ (delete-file
+ (string-append out "/share/info/info.info.gz"))
+ #t)))
+ (add-after 'install 'install-site-start
+ (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/"
+ ,(version-major+minor version)
+ "/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))
+ (with-output-to-file (string-append lisp-dir "/site-start.el")
+ (lambda ()
+ (display "(require 'guix-emacs nil t)")))
+ #t))))))
(inputs
`(("gnutls" ,gnutls)
("ncurses" ,ncurses)
@@ -111,7 +129,8 @@
("libice" ,libice)
("libsm" ,libsm)
("alsa-lib" ,alsa-lib)
- ("dbus" ,dbus)))
+ ("dbus" ,dbus)
+ ("guix-src" ,(package-source guix))))
(native-inputs
`(("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
--
2.6.3
next prev parent reply other threads:[~2016-01-06 16:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 16:55 [PATCH 0/4] Make Emacs find packages in "~/.guix-profile" Alex Kost
2016-01-06 16:55 ` [PATCH 1/4] emacs: Make "guix-emacs.el" independent Alex Kost
2016-01-10 20:23 ` Ludovic Courtès
2016-01-06 16:55 ` [PATCH 2/4] emacs: Move loading packages to "guix-emacs.el" Alex Kost
2016-01-10 20:23 ` Ludovic Courtès
2016-01-06 16:55 ` Alex Kost [this message]
2016-01-10 20:28 ` [PATCH 3/4] gnu: emacs: Find packages in "~/.guix-profile" Ludovic Courtès
2016-01-12 9:18 ` Alex Kost
2016-01-13 13:53 ` Ludovic Courtès
2016-01-06 16:55 ` [PATCH 4/4] doc: Describe how Emacs packages are found Alex Kost
2016-01-10 20:31 ` Ludovic Courtès
2016-01-10 20:21 ` [PATCH 0/4] Make Emacs find packages in "~/.guix-profile" Ludovic Courtès
2016-01-12 9:18 ` Alex Kost
2016-01-13 13:54 ` Ludovic Courtès
2016-01-14 8:46 ` Alex Kost
2016-01-14 13:37 ` Ludovic Courtès
2016-01-29 9:04 ` Alex Kost
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=1452099305-746-4-git-send-email-alezost@gmail.com \
--to=alezost@gmail.com \
--cc=beffa@fbengineering.ch \
--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.