Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:
Toggle quote (9 lines)
>> Propagated inputs could lead to conflicts in a Guix profile. The
>> simplest example I could remember is - you want upgrade package ‘A’
>> which propagates ‘direnv’, but you cannot because package ‘B’ propagates
>> it too. In this case you need to upgrade both ‘A’ and ‘B’ or delete ‘A’
>> (or ‘B’).
>
> Would there be a conflict if they both propagated the same input (in
> this case the direnv binary)?
No conflict for the same input. ;-)
Toggle quote (28 lines)
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 946d01cba5..6eb5bc9d39 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -166,6 +166,7 @@
> #:use-module (gnu packages sphinx)
> #:use-module (gnu packages xdisorg)
> #:use-module (gnu packages shells)
> + #:use-module (gnu packages shellutils)
> #:use-module (gnu packages sqlite)
> #:use-module (gnu packages gnupg)
> #:use-module (gnu packages video)
> @@ -2020,7 +2021,7 @@ Its features are:
> (define-public emacs-direnv
> (package
> (name "emacs-direnv")
> - (version "2.0.0")
> + (version "2.1.0")
> (source
> (origin
> (method git-fetch)
> @@ -2030,8 +2031,20 @@ Its features are:
> (file-name (git-file-name name version))
> (sha256
> (base32
> - "005ibyzsx1fdyrl5iyhqpb1bg83mphzahq7zvw58x00syyqi2z49"))))
> + "0xkqn4604k2imas6azy1www56br8ls4iv9a44pxcd8h94j1fp44d"))))
Could you send a separate patch for direnv update, please?
Toggle quote (19 lines)
> (build-system emacs-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-in-direnv
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let* ((direnv-path (assoc-ref inputs "direnv"))
> + (direnv-bin (string-append
> + "\"" direnv-path "/bin/direnv\"")))
> + (substitute* "direnv.el"
> + (("\"direnv\"") direnv-bin))))))))
> + (inputs
> + `(("direnv" ,direnv)))
> (propagated-inputs
> `(("dash" ,emacs-dash)
> ("with-editor" ,emacs-with-editor)))
> --
> 2.26.2
This will make the following change:
--- /gnu/store/lxi6pqc97fc17v5gkk1pmcq8fazn85sx-emacs-direnv-2.1.0/share/emacs/site-lisp/direnv.el 1970-01-01 03:00:01.000000000 +0300
+++ /gnu/store/f7z69fmfijf9babkk2r4lfaljk4rck4h-emacs-direnv-2.1.0/share/emacs/site-lisp/direnv.el 1970-01-01 03:00:01.000000000 +0300
@@ -30,7 +30,7 @@
(defun direnv--detect ()
"Detect the direnv executable."
- (executable-find "direnv"))
+ (executable-find "/gnu/store/qj4p17czqbmwjx56h7jbf1c245kp8p47-direnv-2.15.2/bin/direnv"))
(defvar direnv--output-buffer-name "*direnv*"
"Name of the buffer filled with the last direnv output.")
@@ -99,7 +99,7 @@
(erase-buffer)
(let* ((default-directory directory)
(process-environment environment)
- (exit-code (call-process "direnv" nil `(t ,stderr-tempfile) nil "export" "json"))
+ (exit-code (call-process "/gnu/store/qj4p17czqbmwjx56h7jbf1c245kp8p47-direnv-2.15.2/bin/direnv" nil `(t ,stderr-tempfile) nil "export" "json"))
(json-key-type 'string))
(prog1
(unless (zerop (buffer-size))
In the first hunk we don't need a ‘executable-find’ call on
‘/gnu/store/…-direnv-…/bin/direnv’.
The second hunk is not good, because it will require to redefine both
direnv--detect and direnv--export in case user needs a custom direnv
binary. direnv--export on upstream's master branch is different in way
we could avoid the second hunk. Could you take a look on this?
Thanks,
Oleg.
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl7ijhkACgkQFn+OpQAa
+pwatQ//aqmz/EdEvwIFT7Xm+a6kmlK1vqxrt8kVw/C/ZBqCuSYW/FnkS6lHSu4t
OVLNuXBLGTKMEKVi9y6VD7p/Y3C+20rTeAs9onJySR7iJxHfbOSCnk9ZyfA0/0Ix
E/VEbMHuxiV8wmwPwmm5ki/iXrhFU7XJtkzCXXiQP5oLElMECXKCFLeFslUl4s42
gpgdqTKibUgIeDzcOzXeacJb8VTMc1eugvV17Lo3LwWGsGeyZj4LYbHCEEfrQQfr
9F7P7wM1JnPI3BEF0xLLHDQtLPzR8w4SnJKfTSXufefscx3UdUyoNHdzD3WFIZtf
0rQ1xeQzWSBdsafP9wMcJ8rLYAXCuR5n/5VkSRKerN5w8SnAlE+f/Y3J0f/0Loct
xOJoG8/g865cxdANHqgh1dCM03HahwtuwrScUDTbcLE4I9D/oogfeWXH481r/YZ4
aHm56e6guueWBd61sqgrotcs7VdhG1WSVzhnPY32MKhd1yhdQywrXwNmC4BnaIFs
c9kmpbDC/bcLmUmX4mAr5KLbnzrnSj0kHlqsBHjFVS+j6u9fQ+bUfdU4937bkW5c
kAyljJ5+Hwm2b1/bIB6qbBwD5G/j71ghCyn4QLs59oGE0meVkXMNLh2D62guvxGG
Ho5BMUFM6xZ0XOpM5XzM4kypfI11tS8du8VULzDID/gkmBnOOnU=
=aT1b
-----END PGP SIGNATURE-----