Subject: [bug#65550] [PATCH] profiles: Don't propagate inputs for non-development packages.

From: [email-masked]
Date: Sat, 26 Aug 2023 21:53:09 +0800

From: 宋文武 <[email-masked]>

* guix/profiles.scm (package->manifest-entry): Only include propagated inputs
from a package for its "dev" output, or its "out" output if the package
doesn't have a "dev" one.
---
 guix/profiles.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index fea766879d..9ed81dec4d 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -390,7 +390,14 @@ (define* (package->manifest-entry package #:optional (output "out")
                           ((label package output)
                            (package->manifest-entry package output
                                                     #:parent (delay entry))))
-                        (package-propagated-inputs package)))
+                        ;; Only add propagated inputs for PACKAGE:dev, or
+                        ;; PACKAGE:out when PACKAGE doesn't have a "dev"
+                        ;; output.
+                        (if (if (member "dev" (package-outputs package))
+                                (equal? "dev" output)
+                                (equal? "out" output))
+                            (package-propagated-inputs package)
+                            '())))
             (entry (manifest-entry
                      (name (package-name package))
                      (version (package-version package))

base-commit: 98a8666a0cbf33e24efff615243b98144a92c950
-- 
2.41.0