GNU bug report logs - #63610
[PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sat, 20 May 2023 16:02:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63610 in the body.
You can then email your comments to 63610 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63610; Package guix-patches. (Sat, 20 May 2023 16:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 20 May 2023 16:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it
Date: Sat, 20 May 2023 18:01:31 +0200
Hi!

As proposed in <https://issues.guix.gnu.org/63050>, this
patch set adds ‘graphviz-minimal’ and uses it in (guix self)
and as a dependency of the ‘guix’ package, thereby reducing
the closure of the development environment and also the
number of things that need to be built before we have ‘guix’.

Thoughts?

Ludo’.

Ludovic Courtès (3):
  gnu: graphviz: Add "minimal" variant.
  self: Build against "graphviz-minimal".
  gnu: guix: Depend on 'graphviz-minimal'.

 gnu/packages/graphviz.scm           |  9 ++++++++-
 gnu/packages/package-management.scm | 11 ++++++++++-
 guix/self.scm                       | 11 +++++++++--
 3 files changed, 27 insertions(+), 4 deletions(-)


base-commit: bac28a52cb7cbc42d7fabbce0e47028367e69a61
-- 
2.40.1





Information forwarded to mail <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, rekado <at> elephly.net, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org:
bug#63610; Package guix-patches. (Sat, 20 May 2023 16:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 63610 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63610 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/3] self: Build against "graphviz-minimal".
Date: Sat, 20 May 2023 18:11:24 +0200
Fixes <https://issues.guix.gnu.org/63050>.
Reported by Andreas Enge <andreas <at> enge.fr>.

* guix/self.scm (%packages): Change "graphviz" to refer to
"graphviz-minimal".  Add "font-ghostscript".
(info-manual): Define 'font-ghostscript'.
[build]: Set XDG_DATA_DIRS.
---
 guix/self.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/guix/self.scm b/guix/self.scm
index 74c953bd50..9e0aa82698 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017-2023 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2020 Martin Becze <mjbecze <at> riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -72,7 +72,8 @@ (define %packages
       ("gettext-minimal"    . ,(ref 'gettext 'gettext-minimal))
       ("gcc-toolchain"      . ,(ref 'commencement 'gcc-toolchain))
       ("glibc-utf8-locales" . ,(ref 'base 'glibc-utf8-locales))
-      ("graphviz"           . ,(ref 'graphviz 'graphviz))
+      ("graphviz"           . ,(ref 'graphviz 'graphviz-minimal))
+      ("font-ghostscript"   . ,(ref 'ghostscript 'font-ghostscript))
       ("texinfo"            . ,(ref 'texinfo 'texinfo)))))
 
 (define (specification->package name)
@@ -404,6 +405,9 @@ (define (info-manual source)
   (define graphviz
     (specification->package "graphviz"))
 
+  (define font-ghostscript
+    (specification->package "font-ghostscript"))
+
   (define glibc-utf8-locales
     (specification->package "glibc-utf8-locales"))
 
@@ -444,6 +448,9 @@ (define (info-manual source)
 
           ;; Build graphs.
           (mkdir-p (string-append #$output "/images"))
+
+          (setenv "XDG_DATA_DIRS"                 ;fonts needed by 'dot'
+                  #+(file-append font-ghostscript "/share"))
           (for-each (lambda (dot-file)
                       (invoke #+(file-append graphviz "/bin/dot")
                               "-Tpng" "-Gratio=.9" "-Gnodesep=.005"
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#63610; Package guix-patches. (Sat, 20 May 2023 16:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 63610 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63610 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 1/3] gnu: graphviz: Add "minimal" variant.
Date: Sat, 20 May 2023 18:11:23 +0200
* gnu/packages/graphviz.scm (graphviz-minimal): New variable.
---
 gnu/packages/graphviz.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 26ee96afd4..30dd6d3405 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2013, 2015, 2021, 2023 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2015, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Theodoros Foradis <theodoros <at> foradis.org>
 ;;; Copyright © 2017, 2018, 2019, 2022 Ricardo Wurmus <rekado <at> elephly.net>
@@ -124,6 +124,13 @@ (define-public graphviz
      '((release-monitoring-url . "https://graphviz.org/download/source/")))
     (license license:epl1.0)))
 
+(define-public graphviz-minimal
+  (package/inherit graphviz
+    (name "graphviz-minimal")
+    (inputs (modify-inputs (package-inputs graphviz)
+              (delete "libxrender" "libx11" "pango" "libxaw")))
+    (synopsis "Graph visualization software (without X11 support)")))
+
 (define-public python-graphviz
   (package
     (name "python-graphviz")
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#63610; Package guix-patches. (Sat, 20 May 2023 16:12:02 GMT) Full text and rfc822 format available.

Message #14 received at 63610 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63610 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 3/3] gnu: guix: Depend on 'graphviz-minimal'.
Date: Sat, 20 May 2023 18:11:25 +0200
* 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 --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
-- 
2.40.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 24 May 2023 13:07:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Wed, 24 May 2023 13:07:02 GMT) Full text and rfc822 format available.

Message #19 received at 63610-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63610-done <at> debbugs.gnu.org
Subject: Re: bug#63610: [PATCH 0/3] Add 'graphviz-minimal' and have Guix
 depend on it
Date: Wed, 24 May 2023 15:06:49 +0200
Hi,

Ludovic Courtès <ludo <at> gnu.org> skribis:

>   gnu: graphviz: Add "minimal" variant.
>   self: Build against "graphviz-minimal".
>   gnu: guix: Depend on 'graphviz-minimal'.

Applied, with an additional change to remove “font-ghostscript” from the
inputs of ‘guix-daemon’.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jun 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.