diff mbox series

[bug#52486,v2,2/2] gnu: deluge: Remove reference of build-time librsvg

Message ID 20211214191713.18665-3-dev@jpoiret.xyz
State Accepted
Headers show
Series Fix deluge propagating a librsvg incompatible with that of gtk+ | expand

Commit Message

Josselin Poiret Dec. 14, 2021, 7:17 p.m. UTC
* gnu/packages/bittorrent.scm (deluge): Do it.
---
 gnu/packages/bittorrent.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

Comments

Leo Famulari Jan. 16, 2022, 5:58 p.m. UTC | #1
On Tue, Dec 14, 2021 at 08:17:13PM +0100, Josselin Poiret wrote:
> * gnu/packages/bittorrent.scm (deluge): Do it.

Thanks for working on this!

Can you send a followup patch adding a code comment that explains the
change? It's good practice to explain code that does strange things,
especially in packages. Otherwise later package maintainers may feel
free to remove it.
Brice Waegeneire Jan. 16, 2022, 9:41 p.m. UTC | #2
Hi Leo,

It didn't came into my mind to ask for such explanation to be added as a
commentary, even tho I asked Josselin about it on IRC.  I have subbmited a patch
adding such comment in <https://issues.guix.gnu.org/53308>.

Cheers,
- Brice
diff mbox series

Patch

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 6c6d01991a..2a59b94f92 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -564,9 +564,19 @@  (define-public deluge
                (("names='ngettext'") "names=['ngettext']"))
              #t))
          (add-after 'install 'wrap
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
              (let ((out               (assoc-ref outputs "out"))
-                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH")))
+                   (gi-typelib-path
+                    (string-join (filter
+                                  (lambda (x) (not (string-prefix?
+                                                    (assoc-ref
+                                                     (or native-inputs inputs)
+                                                     "librsvg")
+                                                    x)))
+                                  (string-split
+                                   (getenv "GI_TYPELIB_PATH")
+                                   #\:))
+                                 ":")))
                (for-each
                 (lambda (program)
                   (wrap-program program