From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CBLUFpqXUGc4FwEAqHPOHw:P1 (envelope-from ) for ; Wed, 04 Dec 2024 17:55:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id CBLUFpqXUGc4FwEAqHPOHw (envelope-from ) for ; Wed, 04 Dec 2024 18:55:38 +0100 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=g3x3D44q; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Mv4PNaZ3; dmarc=pass (policy=none) header.from=gnu.org; 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-Seal: i=1; s=key1; d=yhetil.org; t=1733334938; a=rsa-sha256; cv=none; b=hza2Mcww2YlLL+RIAATyJ+nvex8b+QFCq95Poj79RlEj5CAGcsdg64oGsR1xJvexj3uBsp g/siZm/tDawUjtKXkWzp/NDaXCkQu3HK0rspbV8tkCrzdJ6+xOHYk9kKlSjpICYsBCDEft WPvSB6zgipEBVrjU/ghOA9WkvtqaCgUS8+DU7t2rtNw3fD8RaCmgtMjy6hv1TArFT385Wt HBAWYOlmOMQP8sol7klIL06JBUPRPAfqDfkCLDOAdJFy8bcb0co4NP9O6BnDkkgI44yc/b qlDYt4xHbRe8vSl+SHLFH9otNQnImhl1E1qDxywPqFe2wMHJGVqhJFBElVIAOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=g3x3D44q; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Mv4PNaZ3; dmarc=pass (policy=none) header.from=gnu.org; 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=1733334938; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2g4yi1SA1v9OELZ5IsgQqlmNyB0qXZ4jgu6Ua2kNwqM=; b=q6TQkyp0mHH36sSSzPQFFKhANBNLu7OSPia3JtyFWsWE6oo/2YjbUhAS2F1v2ONzqnwYYz kth5OqAydoiE0jggoLWQwCY44cr7r7bi75mqWpZptvGrbp+gPg+hgDJf2eLVmdg9oEUiPy hnsEt2wVIir1O99NkJjdb6Go9UhOXFsnFRNRDn1Gyv2ZSv+1nlaM67Iw/hmwCKxdhJUaoj 2SHgVblbADmhCBbwAZyxFyRVJjNRUVgQzm/1nPTy4ungtvnWRgZi2iNpFBJMAL8Nj23Rmh bWC/7Q8o09ImoG1dcfXYordbt6pWgHfMXAcNX/6T3XazXf9mWBU/eRiwGHJVsg== 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 0C1835978A for ; Wed, 04 Dec 2024 18:55:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tItam-0004lo-Dy; Wed, 04 Dec 2024 12:55:16 -0500 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 1tItah-0004lC-Qp for guix-patches@gnu.org; Wed, 04 Dec 2024 12:55:12 -0500 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 1tItah-0001We-EG; Wed, 04 Dec 2024 12:55:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=2g4yi1SA1v9OELZ5IsgQqlmNyB0qXZ4jgu6Ua2kNwqM=; b=g3x3D44qOw+/oiOT2DGf/STHYT2IY9bV7bAmTVFelj2HTnvZP70HxGQpnsjeyYiDNScDU/9YuH9WgaUrA10O+cIy+CPpXz9nkQclNMDxnjjuv/yZP630ujwhXAH0sYCrRqKG045vLBkZ3dTjlWULyeJnwKYZ5a8FA/lAaLguLSE12VprqKqrzToFaIV4ICYTh3Ni4X5xx2NkcmdPulV9PoLsqJmshNPWvvQXecpHnx57Iq6YbNyBhnnHNLj/f1TNNI3yIn/5frH+mI9dsT7MOrmqZ20f7swnznfihS4PDj9TfGXgdqI24Z//OMmvXY3I2WBPAsa7HA9IlX2f2jQiDA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tItaY-0006XV-I8; Wed, 04 Dec 2024 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#73073] [PATCH v3 1/8] packages: Use origin file names as their input labels. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, guix@cbaines.net, janneke@gnu.org, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, guix@nicolasgoaziou.fr, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Wed, 04 Dec 2024 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73073 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: 73073@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Simon Tournier , Andreas Enge , Christopher Baines , Janneke Nieuwenhuizen , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Andreas Enge , Christopher Baines , Janneke Nieuwenhuizen , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 73073-submit@debbugs.gnu.org id=B73073.173333489825113 (code B ref 73073); Wed, 04 Dec 2024 17:55:02 +0000 Received: (at 73073) by debbugs.gnu.org; 4 Dec 2024 17:54:58 +0000 Received: from localhost ([127.0.0.1]:36692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tItaT-0006Wx-Ai for submit@debbugs.gnu.org; Wed, 04 Dec 2024 12:54:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tItaQ-0006WV-QL for 73073@debbugs.gnu.org; Wed, 04 Dec 2024 12:54:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tItaL-0001Js-JP; Wed, 04 Dec 2024 12:54:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=2g4yi1SA1v9OELZ5IsgQqlmNyB0qXZ4jgu6Ua2kNwqM=; b=Mv4PNaZ3qYWRTCivVkuy +5/cReciLA/MZapF7fmldPikZ7Zdwobkn5m3AtIqeUbiX8ri45+z/9IH3SqqojSU2Gic7sf5Xb4ap miL8byyEfOwt6KW/K/jGn1H08trpnKwRNOpco4sUzlU7nX3OyL4DUm7CFycIlujbys6LcG2hki+7/ A5lO6TKbV/OJdHNBRhBJFIl5Cfph4ETltac/DefeM8VLrB28n/gcvhfl2cokHPtyQ+T9yqajK9Yoo WKWV7RljCi30qbwjAQMl3vR0+bxqLtI/U1UrC8vyj7QbErYP1qMTt+cyJcMgciahe1ljR4/iogrQK 1sIVlskCHR6pGQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 4 Dec 2024 18:54:22 +0100 Message-ID: <0d6eb889edc5675f9afff3efba15fa2058651874.1733334723.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Queue-Id: 0C1835978A X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.03 X-Spam-Score: -6.03 X-TUID: 7DUl+KgLAcb7 * guix/packages.scm (add-input-label): Rely on 'origin-actual-file-name' for internal inputs labels. * tests/packages.scm ("this-package-input, origin"): New test. * gnu/packages/base.scm (tzdata)[inputs]: Reintroduce label. * gnu/packages/tex.scm (texlive-hyphen-complete)[inputs]: Likewise. (texlive-newverbs)[native-inputs]: Likewise. Change-Id: I6ba5352b1b1b8ab810da3730b09cb9db61d6429c Co-authored-by: Simon Tournier --- gnu/packages/base.scm | 19 +++++++++++-------- gnu/packages/tex.scm | 21 ++++++++++++--------- guix/packages.scm | 3 +++ tests/packages.scm | 10 +++++++++- 4 files changed, 35 insertions(+), 18 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index b3f54798c4..a5a05e32f0 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1778,14 +1778,17 @@ (define-public tzdata (delete-file-recursively (string-append out "/share/zoneinfo-leaps"))))) (delete 'configure)))) - (inputs (list (origin - (method url-fetch) - (uri (string-append - "https://data.iana.org/time-zones/releases/tzcode" - version ".tar.gz")) - (sha256 - (base32 - "07hn7hn2klw4dfyr673ril2nrk18198hbfv25gljsvc833hzk9g9"))))) + (inputs `(("_" + ;; Note: The "_" label above is here to avoid a full rebuild. + ;; TODO: Remove it on next rebuild cycle. + ,(origin + (method url-fetch) + (uri (string-append + "https://data.iana.org/time-zones/releases/tzcode" + version ".tar.gz")) + (sha256 + (base32 + "07hn7hn2klw4dfyr673ril2nrk18198hbfv25gljsvc833hzk9g9")))))) (home-page "https://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 0444b9270d..9104b079a2 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -706,14 +706,15 @@ (define-public texlive-hyphen-complete (string-append "File.join(\"" ptex "\""))) (invoke "ruby" "generate-ptex-patterns.rb")))))))) (native-inputs - (list ruby-2.7 - ruby-hydra-minimal/pinned - ;; Build phase requires "docstrip.tex" from TEXLIVE-LATEX. - ;; However, adding this package to native inputs would initiate - ;; a circular dependency. To work around this, use TEXLIVE-LATEX - ;; source, then add "docstrip.tex" to TEXINPUTS before build. - (package-source texlive-latex) - texlive-tex)) + ;; TODO: Remove input labels on next rebuild cycle. + `(("ruby" ,ruby-2.7) + ("ruby-hydra-minimal" ,ruby-hydra-minimal/pinned) + ;; Build phase requires "docstrip.tex" from TEXLIVE-LATEX. + ;; However, adding this package to native inputs would initiate + ;; a circular dependency. To work around this, use TEXLIVE-LATEX + ;; source, then add "docstrip.tex" to TEXINPUTS before build. + ("_" ,(package-source texlive-latex)) + ("texlive-tex" ,texlive-tex))) (home-page "https://ctan.org/pkg/hyph-utf8") (synopsis "Hyphenation patterns expressed in UTF-8") (description @@ -65048,7 +65049,9 @@ (define-public texlive-newverbs "tex/generic/ydoc/ydocstrip.tex") "build/") (setenv "TEXINPUTS" (string-append (getcwd) "/build:"))))))) - (native-inputs (list (package-source texlive-ydoc))) + (native-inputs + ;; TODO: Remove input label on next rebuild cycle. + `(("_" ,(package-source texlive-ydoc)))) (home-page "https://ctan.org/pkg/newverbs") (synopsis "Define new versions of @code{\\verb}") (description diff --git a/guix/packages.scm b/guix/packages.scm index 0ce3276051..84f2c6f838 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -678,6 +678,9 @@ (define (add-input-label input) "_") ,obj ,@(if (string=? output "out") '() (list output))))) + ((? origin? origin) + ;; Allow references to origins by their file name. + (list (or (origin-actual-file-name origin) "_") origin)) (x `("_" ,x)))) diff --git a/tests/packages.scm b/tests/packages.scm index 7c28e75c45..1d901505aa 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2023 Ludovic Courtès +;;; Copyright © 2012-2024 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos @@ -2051,6 +2051,14 @@ (define compressors '(("gzip" . "gz") (dummy-package "a" (arguments (this-package-native-input "hello"))))) +(test-equal "this-package-input, origin" + "http://example.org/foo.tar.gz" + (origin-uri + (package-arguments + (dummy-package "a" + (inputs (list (dummy-origin (uri "http://example.org/foo.tar.gz")))) + (arguments (this-package-input "foo.tar.gz")))))) + (test-eq "modify-inputs, replace" coreutils ;; Replace an input; notice that the label in unchanged. -- 2.46.0