From f8f005815efdf9f0d5d2a5ac30c6fdd19aa22e72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 Dec 2024 18:26:07 +0100 Subject: packages: Use origin file names as their input labels. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. * doc/guix.texi (package Reference): Mention origin lookup for ‘lookup-package-input’ & co. * 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 --- tests/packages.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') 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 @@ (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. -- cgit v1.2.3