Subject: [bug#72943] [PATCH] gnu: gd: Requires.private to propagated inputs

From: Rutherther <[email-masked]>
Date: Mon, 02 Sep 2024 17:23:22 +0000

Hello Carlo,

thank you for finding that!
That explains why this issue was caused in the first place,
I was wondering how this could've been unspotted till now.

It seems much better to me to not use propagated-inputs whenever possible,
so I prefer your solution to this one. However, I do wonder about this: other packages that
have Requires.private do provide the libraries in these as propagated-inputs. Also
the cookbook shows to do this with such libraries. What is the correct approach here
then? Maybe every package that has Requires.private could be patched like this, possibly
somehow automatically instead of manual patches?

I am quite new here, this is my first patch. So I am not really sure how to go about this.
Will you open a new issue with your patch, and maintainers will decide patch from which
issue to use? Or is it enough it's in this issue?

I am sending an updated patch with a comment for why specifying
propagates-inputs would be necessary in the meantime,
as Tobias suggested me in a review in #guix IRC channel.

---
 gnu/packages/gd.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index 98d34cfa71..1380493c44 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -85,7 +85,8 @@ (define-public gd
                                          "\\.la$")))))))
     (native-inputs
      (list pkg-config))
-    (inputs
+    ;; These libraries are in 'Requires.private' in libgd.pc.
+    (propagated-inputs
      (list fontconfig
            freetype
            libjpeg-turbo
-- 
2.45.2