From: Oleg Pykhalov <go.wigust@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Alex Kost <alezost@gmail.com>, bug-guix@gnu.org, 28832@debbugs.gnu.org
Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 19 Dec 2017 13:46:56 +0300 [thread overview]
Message-ID: <87lghzyoyn.fsf@gmail.com> (raw)
In-Reply-To: <87lgke3vlz.fsf@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1422 bytes --]
Hello Ludovic,
Thank you for refactoring notes!
ludo@gnu.org (Ludovic Courtès) writes:
> I think it would have been better to open a separate issue for this.
> Here are some superficial comments. I hope someone more knowledgeable
> about Emacs can comment.
OK, I CC bug-guix@gnu.org in this message.
Previos discussion: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28832#17
> Oleg Pykhalov <go.wigust@gmail.com> skribis:
[...]
> Please see ‘C-x v l’ in that file for the syntax of commit logs. :-)
Oh, nice tip. Thanks!
[...]
> Did you try rebuilding Emacs packages, and to simplify those that
> explicitly pass -L flags?
I tried it on emacs-json-reformat which wants many -L flags and
succeeded build a manifest with following packages and patch:
emacs-aggressive-indent emacs-company emacs-company-quickhelp
emacs-debbugs emacs-elfeed emacs-erc-hl-nicks emacs-default-encrypt
emacs-god-mode emacs-ggtags emacs-git-gutter emacs-gitpatch emacs-guix
emacs-helm emacs-helm-make emacs-helm-projectile
emacs-highlight-stages emacs-ivy emacs-markdown-mode
emacs-multiple-cursors emacs-nix-mode emacs-org emacs-projectile
emacs-rainbow-delimiters emacs-rainbow-mode emacs-slime
emacs-smartparens emacs-transmission emacs-transpose-frame
emacs-use-package emacs-w3m emacs-which-key emacs-yasnippet
emacs-yasnippet-snippets flycheck geiser magit
[-- Attachment #1.2: [PATCH] emacs-build-system: Add EMACSLOADPATH. --]
[-- Type: text/x-patch, Size: 3217 bytes --]
From c66f03c09517571a03fdf97b86bc571a71e969bf Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Wed, 13 Dec 2017 08:10:21 +0300
Subject: [PATCH] emacs-build-system: Handle EMACSLOADPATH environment
variable.
Define the 'EMACSLOADPATH' environment variable to carry all inputs in tests.
* guix/build/emacs-build-system.scm (setup-environment): New procedure.
(%standard-phases): Use the new setup-environment procedure.
---
guix/build/emacs-build-system.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index bd0d2e026..9897abf9e 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -222,6 +223,37 @@ second hyphen. This corresponds to 'name-version' as used in ELPA packages."
strip-store-file-name)
store-dir))
+(define* (setup-environment #:key inputs #:allow-other-keys)
+ "Export the variable EMACSLOADPATH, which are based on INPUTS respectively."
+ (define (name+version input)
+ (package-name->name+version (strip-store-file-name input)))
+ (match (assoc "emacs" inputs)
+ ((name . input)
+ (setenv "EMACSLOADPATH"
+ (string-join (list input "share" name
+ ((compose (lambda (_ version) version)
+ name+version)
+ input)
+ "lisp")
+ "/"))))
+ (for-each (match-lambda
+ ((name . input)
+ (setenv "EMACSLOADPATH"
+ (string-append
+ (or (getenv "EMACSLOADPATH") "")
+ ":" input %install-suffix "/"
+ ((compose (lambda (name version)
+ (string-append
+ (string-drop name
+ (string-length "emacs-"))
+ "-" version))
+ name+version)
+ input)))))
+ (fold alist-delete (emacs-inputs inputs) '("emacs" "source")))
+ (format #t "environment variable EMACSLOADPATH set to `~a'~%"
+ (getenv "EMACSLOADPATH"))
+ #t)
+
(define %standard-phases
(modify-phases gnu:%standard-phases
(replace 'unpack unpack)
@@ -229,6 +261,7 @@ second hyphen. This corresponds to 'name-version' as used in ELPA packages."
(delete 'check)
(delete 'install)
(replace 'build build)
+ (add-before 'build 'setup-environment setup-environment)
(add-before 'build 'install install)
(add-after 'install 'make-autoloads make-autoloads)
(add-after 'make-autoloads 'patch-el-files patch-el-files)
--
2.15.1
[-- Attachment #1.3: Type: text/plain, Size: 7 bytes --]
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-12-19 10:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-14 9:51 [bug#28832] [PATCH 0/3] gnu: Add emacs-json-mode Oleg Pykhalov
2017-10-14 10:29 ` [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat Oleg Pykhalov
2017-10-14 10:29 ` [bug#28832] [PATCH 2/3] gnu: Add emacs-json-snatcher Oleg Pykhalov
2017-10-20 12:41 ` Ludovic Courtès
2017-10-14 10:29 ` [bug#28832] [PATCH 3/3] gnu: Add emacs-json-mode Oleg Pykhalov
2017-10-20 12:34 ` [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat Ludovic Courtès
2017-12-01 10:23 ` Ludovic Courtès
2017-12-11 23:12 ` Oleg Pykhalov
2017-12-12 9:17 ` Ludovic Courtès
2017-12-12 17:23 ` Alex Kost
2017-12-13 4:55 ` Oleg Pykhalov
2017-12-15 20:35 ` Alex Kost
2017-12-15 9:36 ` Oleg Pykhalov
2017-12-15 14:02 ` Ludovic Courtès
2017-12-19 10:46 ` Oleg Pykhalov [this message]
2017-12-19 20:57 ` Alex Kost
2017-12-20 3:26 ` Oleg Pykhalov
2017-12-20 22:10 ` Alex Kost
2017-12-21 4:48 ` Oleg Pykhalov
2017-12-22 20:20 ` Alex Kost
2017-12-15 20:35 ` Alex Kost
2017-12-19 11:07 ` Oleg Pykhalov
2018-01-11 21:46 ` Ludovic Courtès
2018-01-15 12:01 ` bug#28832: " Oleg Pykhalov
2018-01-15 13:33 ` [bug#28832] " Ludovic Courtès
2018-01-16 17:32 ` 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=87lghzyoyn.fsf@gmail.com \
--to=go.wigust@gmail.com \
--cc=28832@debbugs.gnu.org \
--cc=alezost@gmail.com \
--cc=bug-guix@gnu.org \
--cc=ludo@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.