From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRFSM-0001vV-5a for guix-patches@gnu.org; Tue, 19 Dec 2017 05:49:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRFSI-0007MW-1t for guix-patches@gnu.org; Tue, 19 Dec 2017 05:49:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:60834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRFSH-0007MJ-Si for guix-patches@gnu.org; Tue, 19 Dec 2017 05:49:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eRFSH-0003EB-Ll for guix-patches@gnu.org; Tue, 19 Dec 2017 05:49:01 -0500 Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. In-Reply-To: <87lgke3vlz.fsf@gmail.com> Resent-Message-ID: From: Oleg Pykhalov References: <87lgke3vlz.fsf@gmail.com> <20171014102915.11778-1-go.wigust@gmail.com> <87y3o6uheo.fsf@gnu.org> <87d13yiw6w.fsf@gnu.org> <87609cluzf.fsf@gmail.com> <87zi6os3u3.fsf@gnu.org> <87fu8famhm.fsf@gmail.com> <877etofi3n.fsf@gmail.com> <87vah8hyxs.fsf@gnu.org> Date: Tue, 19 Dec 2017 13:46:56 +0300 Message-ID: <87lghzyoyn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Alex Kost , bug-guix@gnu.org, 28832@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ludovic, Thank you for refactoring notes! ludo@gnu.org (Ludovic Court=C3=A8s) 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=3D28832#17 > Oleg Pykhalov skribis: [...] > Please see =E2=80=98C-x v l=E2=80=99 in that file for the syntax of commi= t 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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-emacs-build-system-Handle-EMACSLOADPATH-environment-.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] emacs-build-system: Add EMACSLOADPATH. From=20c66f03c09517571a03fdf97b86bc571a71e969bf Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov 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 test= s. * guix/build/emacs-build-system.scm (setup-environment): New procedure. (%standard-phases): Use the new setup-environment procedure. =2D-- 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-sys= tem.scm index bd0d2e026..9897abf9e 100644 =2D-- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2015 Federico Beffa ;;; Copyright =C2=A9 2016 David Thompson ;;; Copyright =C2=A9 2016 Alex Kost +;;; Copyright =C2=A9 2017 Oleg Pykhalov ;;; ;;; 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)) =20 +(define* (setup-environment #:key inputs #:allow-other-keys) + "Export the variable EMACSLOADPATH, which are based on INPUTS respective= ly." + (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 u= sed 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) =2D-=20 2.15.1 --=-=-= Content-Type: text/plain Oleg. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlo47iAACgkQckbhHGm3 lWlk7hAAqCLXXev9SVyFvT3exIBwpczBqjzfJRYXeM/bWnQ+FYL5AlaXZzlMs/Jo gG4PXcnVX8UBmcCQH5X84EkRLGtLosy4SLKVhU6q/cqI1t4YEHfVaeVNiNqK0E1c Oc6o24TxFj7Roau/PXQ5eVMSsIe5gxstX5Q7nZVSf/tUzzSITyRAcUpE799egnak xS4RAWD49ZDxQiaTljBv61jBgra+rmDebnEm5XPFG6NoxAiw0k+lRfNs2jENhpQJ j01dxkivSTk2XCHknBwzeEh7wSCO8kGiQz8rD14RTAGOkDNH4NIHiDrPAvB5PoCx 1r2SlIlhUV4PpSfed1zR9TUIrxGBTk94TMOMvR64I3V5J7/AcQrD7sv5OgAmDMlh pvEJKnqp9Bt/e68iP8Tv/QoniZSdjyPBl2UB5Ty4Vl87ChpbNi3X2JxB9mc5Un52 zCDH54Ycu4OWif2V0I6jS4nXezmz3vWNm9mT6WusoVmjPW76Nh50FPYT5+P6PcV+ /IGsND2lO5SXx6Syau3iCOV885iXw2c/UhaWmZlSdrBD0i2s95MGQbA7gs9usU4w O7RxR/z7qdpEeZ5qnG3pEOmqAmDYgJnkosa9NyS8vhBKDlu59WM36JHray2SYnlF ij8y0vPC6I0XWUH5qF1+DOWFNLU/XYiwqltgy8mHumo9wGfUBeU= =uzE+ -----END PGP SIGNATURE----- --==-=-=--