Subject: [PATCH core-updates 1/1] packages: Specify output in input label when it's not "out".

From: Hilton Chain <[email-masked]>
Date: Sat, 5 Aug 2023 10:53:16 +0800

* guix/packages.scm (add-input-label): Specify output when it's not "out".
---
 guix/packages.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index ba98bb0fb4..d0e6e16cbb 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -626,7 +626,13 @@ (define (add-input-label input)
     ((? package? package)
      (list (package-name package) package))
     (((? package? package) output)                ;XXX: ugly?
-     (list (package-name package) package output))
+     (if (string=? output "out")
+         ;; (package "out") => ("package" package "out")
+         (list (package-name package) package output)
+         ;; (package "output") => ("package:output" package "output")
+         (list (string-append (package-name package) ":" output)
+               package
+               output)))
     ((? gexp-input?)       ;XXX: misplaced because 'native?' field is ignored?
      (let ((obj    (gexp-input-thing input))
            (output (gexp-input-output input)))
-- 
2.41.0