gnu: librsvg: Add 'librsvg-for-system' procedure.
authorLudovic Courtès <ludo@gnu.org>
Thu, 2 Dec 2021 12:15:31 +0000 (13:15 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 2 Dec 2021 13:59:56 +0000 (14:59 +0100)
* gnu/packages/gnome.scm (librsvg-for-system): New procedure.

gnu/packages/gnome.scm

index fd67be7..727d061 100644 (file)
@@ -3679,6 +3679,17 @@ diagrams.")
     (synopsis "Render SVG files using Cairo (ancient C version)")
     (properties '((hidden? . #t)))))
 
+(define* (librsvg-for-system #:optional
+                             (system (or (%current-target-system)
+                                         (%current-system))))
+  ;; Since librsvg 2.50 depends on Rust, and Rust is only correctly supported
+  ;; on x86_64 so far, use the ancient C version on other platforms (FIXME).
+  (if (string-prefix? "x86_64-" system)
+      librsvg
+      librsvg-2.40))
+
+(export librsvg-for-system)
+
 (define-public libidl
   (package
     (name "libidl")