From patchwork Thu Jun 11 20:03:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 22672 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 604D927BBE3; Thu, 11 Jun 2020 21:58:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BA2BF27BBE1 for ; Thu, 11 Jun 2020 21:58:11 +0100 (BST) Received: from localhost ([::1]:40094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjUH5-0002OQ-Aw for patchwork@mira.cbaines.net; Thu, 11 Jun 2020 16:58:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjTQg-0001tN-RO for guix-patches@gnu.org; Thu, 11 Jun 2020 16:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjTQg-00051p-CY for guix-patches@gnu.org; Thu, 11 Jun 2020 16:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjTQg-0006aE-6i for guix-patches@gnu.org; Thu, 11 Jun 2020 16:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41790] [PATCH] Update emacs-direnv Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Jun 2020 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41790 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Katherine Cox-Buday Cc: 41790@debbugs.gnu.org Received: via spool by 41790-submit@debbugs.gnu.org id=B41790.159190583125290 (code B ref 41790); Thu, 11 Jun 2020 20:04:02 +0000 Received: (at 41790) by debbugs.gnu.org; 11 Jun 2020 20:03:51 +0000 Received: from localhost ([127.0.0.1]:38172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjTQV-0006Zp-Hz for submit@debbugs.gnu.org; Thu, 11 Jun 2020 16:03:51 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:37271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjTQT-0006Zb-Bg for 41790@debbugs.gnu.org; Thu, 11 Jun 2020 16:03:49 -0400 Received: by mail-lf1-f67.google.com with SMTP id x22so4213205lfd.4 for <41790@debbugs.gnu.org>; Thu, 11 Jun 2020 13:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=QXv3bSYsM8Q+DzWPQBJCc+PZQRHdKbPDXQ128xHHa94=; b=r2wWlsrkmGEB0x3BHfqzm0KrGvLQQP4L2uf6p1Dcy0xa6wwi62doZ6/zFFOWIz4d5Q nCILaGZ5yT0BxeH5uibikWd0OkCiaqxcuxsKxtlXhMYOpWtYXXBNHVyOEKwEFhfEjGOx j5rjgpllWpMf3UE3pP0UoxmNLlNmlBZqqPBWHbR0pQ8l7W7Jo+Mqup7qvUWH2ZnrG2mX gEdgsDqHnjR3tdm68tsMg4F8Qdwq1kHHMRucRM71HXdJbURxOFgcbsmI1EYG2xd7NnkU +E9TwF54Z0L7oGpN2hrCvWH/OyPdsRItDBftDpNrx2A+lUh7QolencBLixusKnT/B5xq 0uxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=QXv3bSYsM8Q+DzWPQBJCc+PZQRHdKbPDXQ128xHHa94=; b=jFnHnucjUzG+8dOo0mnBXljjK+B279Il+naBYbEBH9T4O+yMXUgMwKzfdr7pVQyoGA fJVnf3Zno9u2ZeHjFrDpghILmu+JEYtsEbQ6SKqCkTEUUyIEfn6ZwryIXGLUa5FK6mdX byA96MDXURZsXGG2NS6xlgqSf1jWCsad13DvGS2D1IM+kGFYZJ5wL2axzbkWB/9XmKKX 2zHCA/y+FjdznOKCb2xfLylA/kjtIrgw5rlud7Q6bxj17o+QEYJOA8TRtHcvpOLP1+Fj JjogvXpoqFKieyzAdbX3JDXvwRSBQ85/zXJj8i0rlRvlgbF7o0pYWUYa92Cv74u9CRCx OLow== X-Gm-Message-State: AOAM5313nJbXd8T4NcMKfBQembRktOOoRThiFAmkqZuCS/g+84tV12Wz XeA/9qN/A0qr6gWvhdcTJm72Mnxe X-Google-Smtp-Source: ABdhPJxUUR3+seqlR4ig1sCpx1WsOc4yWFJkwLWtf/yurAmcgwtTbtHm8XgPlf/lZlJrc0h2jL9nPA== X-Received: by 2002:a19:f508:: with SMTP id j8mr4938608lfb.146.1591905822762; Thu, 11 Jun 2020 13:03:42 -0700 (PDT) Received: from guixsd (92-100-136-169.dynamic.avangarddsl.ru. [92.100.136.169]) by smtp.gmail.com with ESMTPSA id y12sm959629ljh.79.2020.06.11.13.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 13:03:41 -0700 (PDT) From: Oleg Pykhalov References: <871rmmoq7u.fsf@nicolasgoaziou.fr> <87pna6zy3l.fsf@gmail.com> <87k10e92tg.fsf@gmail.com> <87eeql8xws.fsf@gmail.com> Date: Thu, 11 Jun 2020 23:03:37 +0300 In-Reply-To: <87eeql8xws.fsf@gmail.com> (Katherine Cox-Buday's message of "Thu, 11 Jun 2020 09:44:35 -0500") Message-ID: <87sgf174km.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Katherine Cox-Buday 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: 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. --- /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))