all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 41790@debbugs.gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: [bug#41790] [PATCH] Update emacs-direnv
Date: Thu, 11 Jun 2020 09:44:35 -0500	[thread overview]
Message-ID: <87eeql8xws.fsf@gmail.com> (raw)
In-Reply-To: <87k10e92tg.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 10 Jun 2020 21:46:19 +0300")

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

Oleg Pykhalov <go.wigust@gmail.com> writes:

Heya Oleg, thanks for chiming in.

> 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)?

> Instead we could make the package functional by substituting in
> /gnu/store/…-emacs-direnv-…-checkout/direnv.el file ‘direnv--detect’
> ("Detect the direnv executable.") procedure which could return a path to
> ‘direnv’ binary as a string directly without calling ‘executable-find’.
> WDYT?

In general, I like to keep packages as close to their source as
possible, but I'm slowly learning that this is not often the case when
packaging things (which is a shame and a risk in my opinion).

But all things considered, I think this is probably the right approach
here given the feedback I'm getting.

Here's a patch which should supersede the previous patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-direnv-Update-to-2.1.0.patch --]
[-- Type: text/x-patch, Size: 1991 bytes --]

From 52a5541b8a44c6629f6e2a6d3d47184f2ed5169b Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Wed, 10 Jun 2020 10:09:48 -0500
Subject: [PATCH] gnu: emacs-direnv: Update to 2.1.0.

* gnu/packages/emacs-xyz.scm (emacs-direnv): Update to 2.1.0 and make direnv a
  propagated-input.
---
 gnu/packages/emacs-xyz.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

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"))))
     (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


[-- Attachment #3: Type: text/plain, Size: 60 bytes --]


Thank you both for your thoughtful reviews!

-- 
Katherine

  reply	other threads:[~2020-06-11 14:45 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 [this message]
2020-06-11 20:03         ` Oleg Pykhalov
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeql8xws.fsf@gmail.com \
    --to=cox.katherine.e@gmail.com \
    --cc=41790@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    --cc=mail@nicolasgoaziou.fr \
    /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.