[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
From: |
Alex Kost |
Subject: |
[bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. |
Date: |
Fri, 15 Dec 2017 23:35:17 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello, I have only one addition to the Ludovic's comments.
Oleg Pykhalov (2017-12-15 12:36 +0300) wrote:
[...]
> +(define* (setup-environment #:key inputs #:allow-other-keys)
> + "Export the variable EMACSLOADPATH, which are based on INPUTS
> respectively."
> + (let* ((filtered-inputs (emacs-inputs inputs))
> + (emacs-input-dir (cdr (assoc "emacs" filtered-inputs)))
> + (inputs-dirs (cdr filtered-inputs)))
> + ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
> + ;; dependencies.
> + (setenv "EMACSLOADPATH"
> + (string-append emacs-input-dir "/share/emacs/"
> + (store-directory->package-version emacs-input-dir)
> + "/lisp"))
> + (for-each
> + (lambda (input)
> + (let ((store-item (cdr input)))
> + (setenv "EMACSLOADPATH"
> + (string-append
> + (or (getenv "EMACSLOADPATH") "")
> + ":" store-item %install-suffix "/"
> + ((compose string-drop-emacs store-directory->package-name)
> + store-item)))))
> + ((compose (lambda (inputs) (alist-delete "emacs" inputs))
> + (lambda (inputs) (alist-delete "source" inputs)))
"emacs" and "source" may not be the only inputs that should be deleted.
For example, 'emacs-exwm-x' package also has "xhost" and "dbus" inputs.
And your 'string-drop-emacs' will fail on these names, right?
Since there is 'emacs-package?' function in this module, perhaps it
would be better to use it instead (to add only emacs packages to
EMACSLOADPATH), WDYT?
P.S. Actually, I didn't test your patch, so maybe I just didn't
understand the code properly :-)
--
Alex
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., (continued)
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/15
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Ludovic Courtès, 2017/12/15
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/19
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/20
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/21
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/22
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.,
Alex Kost <=
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19