From: Oleg Pykhalov <go.wigust@gmail.com>
To: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Cc: 41790@debbugs.gnu.org
Subject: [bug#41790] [PATCH] Update emacs-direnv
Date: Thu, 11 Jun 2020 23:03:37 +0300 [thread overview]
Message-ID: <87sgf174km.fsf@gmail.com> (raw)
In-Reply-To: <87eeql8xws.fsf@gmail.com> (Katherine Cox-Buday's message of "Thu, 11 Jun 2020 09:44:35 -0500")
[-- Attachment #1.1: Type: text/plain, Size: 2354 bytes --]
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:
>> 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. ;-)
> 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?
> (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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: diff --]
[-- Type: text/x-patch, Size: 1121 bytes --]
--- /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))
[-- Attachment #1.3: Type: text/plain, Size: 411 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2020-06-11 20:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 15:12 [bug#41790] [PATCH] Update emacs-direnv Katherine Cox-Buday
2020-06-10 16:11 ` Nicolas Goaziou
2020-06-10 16:26 ` Katherine Cox-Buday
2020-06-10 18:05 ` Nicolas Goaziou
2020-06-10 18:31 ` Katherine Cox-Buday
2020-06-10 18:46 ` Oleg Pykhalov
2020-06-11 14:44 ` Katherine Cox-Buday
2020-06-11 20:03 ` Oleg Pykhalov [this message]
2020-06-11 20:31 ` Oleg Pykhalov
2021-08-06 4:49 ` bug#41790: " Maxim Cournoyer
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgf174km.fsf@gmail.com \
--to=go.wigust@gmail.com \
--cc=41790@debbugs.gnu.org \
--cc=cox.katherine.e@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).