From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WPSVMTMl22Zb8QAAqHPOHw:P1 (envelope-from ) for ; Fri, 06 Sep 2024 15:52:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WPSVMTMl22Zb8QAAqHPOHw (envelope-from ) for ; Fri, 06 Sep 2024 17:52:19 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dzmy5BC+; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Stcq9f1f; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725637939; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=En6CAmaTDhD6OAxg+O/d/cpYgNwPoJZaA/W8kkJVbiw=; b=ZM93sOS1GgB93EFl8LMZNJaXN6sGdRvAH8M53Y3tkVwUjQ8qYLe7bSMiKf4n0N1q1h1/ME 1ifOCqFjURU/s91BBHdYIQGbkskDbdjki7ilQxE7OnD+wcjIsLY0M4CIGVYo7OhyDz5CNU RA2ClScyhbIPiq/qIl3MKKB3rpKE8+Py4ZZ0T6SFikS/g1d8UVo4lFjwUNGEAmeTlpHQro NhsPalweZH03wzUjpZS94Kl18wpUKRk4pDUh1UkM2+BmNbs9nEyk7fjxQhJmdOQe62+8ze EMYxFVPdCPFaQVlzQN7OXy4MrEPNnEfUE31cqAuyemKqENwXyiK/jU8JpqqPTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725637939; a=rsa-sha256; cv=none; b=eEbshDPxz8MxLolbkUhT+GshjL+m8IliM9jpEErKFMDIsvKXfEVDn6FPO3zJ1coEJYwpLm x1mn1IateKvJTSXMWmEWGQXFcM0IuoqAImCdAm2YAKy6lrCB2wSpstdkBQv2X3Vjh9zFc6 wJ3s2hJfqmAbzuTRLMHQzN+Ci2nQXUZs9ZOTbB1eJdbrlyEoTeqctJDj7ABggs8icNgt0y zPHKHlVFHgpHLFdnX8isIFajoSgaxrGrFizW0PVLjZwTwnjz328iKXPBDops8EujoC/Hjo Drz+c23m12FgssaiQRZRyXrJ7omFVhnNao3sGUbzYtso3kMHyUs93xlKcuxncA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dzmy5BC+; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Stcq9f1f; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5E37268E8D for ; Fri, 06 Sep 2024 17:52:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smbFl-0004s4-HY; Fri, 06 Sep 2024 11:52:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smbFj-0004ld-S4 for guix-patches@gnu.org; Fri, 06 Sep 2024 11:52:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smbFi-0008Ul-MO for guix-patches@gnu.org; Fri, 06 Sep 2024 11:52:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=En6CAmaTDhD6OAxg+O/d/cpYgNwPoJZaA/W8kkJVbiw=; b=dzmy5BC+cEVK7OUJYxelHXEkj+Q4LtEkqpRmf53Q8vxecxXVSkSkx+W4dXsI4jVqphvhRBKIJ9aRebZtHIQZoBOqm0JdigATuo5AHEuURnAvpOAr7CUX9Xp2TLUaBSmOALs/oH4XOfoYdNE9Ic/r+JyMBE+mKUpJX6PvdRlWVgmH9oRvjN6k+hJAD3v/npZJFQ6VjuIH7Oze/mE8WDGYgWMyGZ5wvOzeIetT+WhLW2t/C6RdWrpdBmj+/pdwhOFBpkayITQQEXM2rh6fgMWTOwRQDxNP5Z2eL6JF0Dot/0bt03HJMlC0gKXei29uNEfmbi/6BtOtpp2K7KwSnm13UQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smbFi-0007Zb-24; Fri, 06 Sep 2024 11:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73073] [PATCH 0/6] Allow origin with label as inputs. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 06 Sep 2024 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73073 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73073@debbugs.gnu.org Cc: Simon Tournier , maxim.cournoyer@gmail.com X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: maxim.cournoyer@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.172563788829067 (code B ref -1); Fri, 06 Sep 2024 15:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Sep 2024 15:51:28 +0000 Received: from localhost ([127.0.0.1]:53914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smbF9-0007Yk-ER for submit@debbugs.gnu.org; Fri, 06 Sep 2024 11:51:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:33512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smbF6-0007Ya-U2 for submit@debbugs.gnu.org; Fri, 06 Sep 2024 11:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smbF6-0002Eh-Jk for guix-patches@gnu.org; Fri, 06 Sep 2024 11:51:25 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smbF4-0008Ty-L8 for guix-patches@gnu.org; Fri, 06 Sep 2024 11:51:24 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-371ba7e46easo1366425f8f.0 for ; Fri, 06 Sep 2024 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725637880; x=1726242680; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=En6CAmaTDhD6OAxg+O/d/cpYgNwPoJZaA/W8kkJVbiw=; b=Stcq9f1fIKjlTjbMlY1Kg9rflYq+FX6XhIj3z4peu+m04pR0TeXNHGsY+D0dWOcbrn BUD/xKL7Wt3pGFdLpO4IY0QzHasa7DvgCMQpFq+BTzQfW4izGHst0JD7qTd6C1WtV7hW moJaukEkt9ewNeU/IKfaERZG5+Obf+d/hgtJE9KGnVTjXa4DZhOpkbbNuezJ6gwYrmlX Upqi5C4WtdInS5fzJtbyJ0gQvEbi4G5luPSUSapPvFo2wC9EBtBCswjh9wGKdsvmqMaC x0Nd8NqRIqdBqhNkrAHzRyly4qPfJEY7vcFa0D07WRcZTaiLMa28sRkccM/eMfGD+NI2 xqLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725637880; x=1726242680; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=En6CAmaTDhD6OAxg+O/d/cpYgNwPoJZaA/W8kkJVbiw=; b=iAuzYzxOXtTeoOtGgbYng83SKNWAN1btq2CLhRRph+DL12NSuBMUXEvl2DxwUf+fl/ gVYsh38Nr/m2YekgMUEsP7RS2BBk7/ntRMely3lgB3T4lbRqKwaDTtt9UtuYYEL0ipG0 M84tmFITTSgQCtEyHsO23dlNzgCfArkTPOPFeWv+q7F/6LXuH/pP96/AqTdyiRwWXVjo Xn3JnEFjQ5/UWo1eI8+OC6RA0SkcoSHnnWPTrSiyI2IWQ2zIkuZoWSv1eIaLS8+usXfD hw+9VTx1ue55lFJIqU5qOZqWL6vVGGk/Wjrkw2Tw/uVoOgBAk0evBtXClOiC0YRp044q aXCQ== X-Gm-Message-State: AOJu0YxQQ0+dM+bJky8ojhNlqKTe8YL9PYVrDc9jphr+ebhqH2WHwCc2 eqUEIWpI2E8X40SztbvzgWPejzpTvIyxlhbvZBKTG35lleMzVJFc7mAMiw== X-Google-Smtp-Source: AGHT+IE/0fpyfSF51EgY4S80kBZaQPJW13PAXXrN8Jh9cGSHTjBjWDO274jVkD0EBseLnAIWwkXc3Q== X-Received: by 2002:a5d:42c2:0:b0:374:ba2c:3028 with SMTP id ffacd0b85a97d-37889682e7fmr2233732f8f.36.1725637880160; Fri, 06 Sep 2024 08:51:20 -0700 (PDT) Received: from lili.. ([2a01:e0a:59b:9120:34c8:9fc9:674c:115f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05c702bsm23987855e9.10.2024.09.06.08.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 08:51:19 -0700 (PDT) From: Simon Tournier Date: Fri, 6 Sep 2024 17:51:14 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.32 X-Spam-Score: -5.32 X-Migadu-Queue-Id: 5E37268E8D X-Migadu-Scanner: mx11.migadu.com X-TUID: SuXo7Z/SMFcG Hi, As discussed in bug#73034 [1], these 5 packages – farstream, gnulib-checkout, smithforth, gnome-recipes and dmd-bootstrap – have an origin inside the ’arguments’ package record. This is annoying because these origins are hidden from ’package-direct-sources’; see module (guix packages). I consider this is bug. :-) Hence this prposal for fixing it. Moreover and tangentially, it appears to me an anti-pattern of the functional paradigm: The data from the impure outside should be handled by the ’source’ record field, or otherwise by ’inputs’, ’native-inputs’ or ’propagated-inputs’ record fields; let say only ’inputs’ for simplicity. To my knowledge, using the old style with label, we strove on this principle. However, using the “new style” [2], it does not offer to have labels with plain package symbol. In other words, for example, this snippet does not work: (list gdmd which `("phobos" ,(origin (method git-fetch) (uri (git-reference (url "https://github.com/dlang/phobos") (commit (string-append "v" version)))) (file-name (git-file-name "phobos" version)) (sha256 (base32 "1yw7nb5d78cx9m7sfibv7rfc7wj3w0dw9mfk3d269qpfpnwzs4n9")))))) The reason is because ’sanitize-inputs’; see module (guix packages). ((_ (list args ...)) (add-input-labels args ...)) ((_ inputs) (maybe-add-input-labels inputs)))) Roughly speaking, because the ’inputs’ starts by the term ’list’ then ’add-input-labels’ is applied, else it applies ’maybe-add-input-labels’. Note that: (define (add-input-labels . inputs) "Add labels to all of INPUTS if needed (this is the rest-argument version of 'maybe-add-input-labels')." (maybe-add-input-labels inputs)) The procedure ’maybe-add-input-labels’ reads: if the first element of the ’inputs’ record field is using the “old style“ then return all as-is, assuming all are “old style”. Else apply to all the ’inputs’ elements the procedure ’add-input-label’. Hence the simple proposal: --8<---------------cut here---------------start------------->8--- diff --git a/guix/packages.scm b/guix/packages.scm index f373136d22..5fea44c2bb 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -676,6 +676,8 @@ (define (add-input-label input) "_") ,obj ,@(if (string=? output "out") '() (list output))))) + (((? string? label) obj) ;Allow old style as sometimes requires by origin in inputs + `(,label ,obj)) (x `("_" ,x)))) --8<---------------cut here---------------end--------------->8--- This allows to write ’inputs’ as above. :-) As done with the 5 packages. And it does not hurt the new style. Maybe “guix style” would need to be adjusted too? WDYT? Cheers, simon 1: [bug#73034] [PATCH v3 0/3] Fix annoyances of Git and update to 2.46.0 Maxim Cournoyer Fri, 06 Sep 2024 13:17:33 +0900 id:87msklct5u.fsf@gmail.com https://issues.guix.gnu.org/73034 https://issues.guix.gnu.org/msgid/87msklct5u.fsf@gmail.com https://yhetil.org/guix/87msklct5u.fsf@gmail.com 2: https://guix.gnu.org/en/blog/2021/the-big-change/ Simon Tournier (6): guix: packages: Allow origin with label as inputs. gnu: dmd-bootstrap: Move phobos origin from phases to native-inputs. gnu: smithforth: Move system.fs origin from phases to native-inputs. gnu: gnome-recipes: Move libgd origin from phases to native-inputs. gnu: farstream: Move common origin from phases to native-inputs. gnu: gnulib: Move phobos origin from phases to native-inputs. gnu/packages/build-tools.scm | 18 ++++++++++-------- gnu/packages/dlang.scm | 22 ++++++++++++---------- gnu/packages/forth.scm | 20 +++++++++++--------- gnu/packages/freedesktop.scm | 24 +++++++++++++----------- gnu/packages/gnome.scm | 22 ++++++++++++---------- guix/packages.scm | 2 ++ 6 files changed, 60 insertions(+), 48 deletions(-) base-commit: 7d2ced8d6d9c38327592d312376d59a8c37fc160 -- 2.45.2