diff mbox series

[bug#63610,3/3] gnu: guix: Depend on 'graphviz-minimal'.

Message ID c42820d3d488ccfc4efa61b9d07cae65c73c7d8f.1684598152.git.ludo@gnu.org
State New
Headers show
Series Add 'graphviz-minimal' and have Guix depend on it | expand

Commit Message

Ludovic Courtès May 20, 2023, 4:11 p.m. UTC
* gnu/packages/package-management.scm (guix)[arguments]: Add
'set-font-path' phase.
[native-inputs]: Change GRAPHVIZ to GRAPHVIZ-MINIMAL.  Add
FONT-GHOSTSCRIPT.
---
 gnu/packages/package-management.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 67de4930ff..1da40f4cab 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -68,6 +68,7 @@  (define-module (gnu packages package-management)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
@@ -273,6 +274,13 @@  (define-public guix
                               (("\"[^\"]*/bin//xz")
                                (string-append "\"" xz "/bin/xz")))))
                         #t))
+                    (add-before 'build 'set-font-path
+                      (lambda* (#:key inputs #:allow-other-keys)
+                        ;; Tell 'dot' where to look for fonts.
+                        (setenv "XDG_DATA_DIRS"
+                                (dirname
+                                 (search-input-directory inputs
+                                                         "share/fonts")))))
                     (add-before 'check 'copy-bootstrap-guile
                       (lambda* (#:key system target inputs #:allow-other-keys)
                         ;; Copy the bootstrap guile tarball in the store
@@ -431,7 +439,8 @@  (define-public guix
                        ("automake" ,automake)
                        ("gettext" ,gettext-minimal)
                        ("texinfo" ,texinfo)
-                       ("graphviz" ,graphviz)
+                       ("graphviz" ,graphviz-minimal)
+                       ("font-ghostscript" ,font-ghostscript) ;fonts for 'dot'
                        ("help2man" ,help2man)
                        ("po4a" ,po4a)))
       (inputs