unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it
@ 2023-05-20 16:01 Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 1/3] gnu: graphviz: Add "minimal" variant Ludovic Courtès
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-20 16:01 UTC (permalink / raw)
  To: 63610; +Cc: Ludovic Courtès

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#63610] [PATCH 1/3] gnu: graphviz: Add "minimal" variant.
  2023-05-20 16:01 [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
@ 2023-05-20 16:11 ` Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 2/3] self: Build against "graphviz-minimal" Ludovic Courtès
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-20 16:11 UTC (permalink / raw)
  To: 63610; +Cc: Ludovic Courtès

* 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@gnu.org>
+;;; Copyright © 2013, 2015, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017, 2018, 2019, 2022 Ricardo Wurmus <rekado@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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#63610] [PATCH 2/3] self: Build against "graphviz-minimal".
  2023-05-20 16:01 [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 1/3] gnu: graphviz: Add "minimal" variant Ludovic Courtès
@ 2023-05-20 16:11 ` Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 3/3] gnu: guix: Depend on 'graphviz-minimal' Ludovic Courtès
  2023-05-24 13:06 ` bug#63610: [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-20 16:11 UTC (permalink / raw)
  To: 63610
  Cc: Ludovic Courtès, Christopher Baines, Josselin Poiret,
	Ludovic Courtès, Mathieu Othacehe, Ricardo Wurmus,
	Simon Tournier, Tobias Geerinckx-Rice

Fixes <https://issues.guix.gnu.org/63050>.
Reported by Andreas Enge <andreas@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@gnu.org>
+;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Martin Becze <mjbecze@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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#63610] [PATCH 3/3] gnu: guix: Depend on 'graphviz-minimal'.
  2023-05-20 16:01 [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 1/3] gnu: graphviz: Add "minimal" variant Ludovic Courtès
  2023-05-20 16:11 ` [bug#63610] [PATCH 2/3] self: Build against "graphviz-minimal" Ludovic Courtès
@ 2023-05-20 16:11 ` Ludovic Courtès
  2023-05-24 13:06 ` bug#63610: [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-20 16:11 UTC (permalink / raw)
  To: 63610; +Cc: Ludovic Courtès

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#63610: [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it
  2023-05-20 16:01 [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
                   ` (2 preceding siblings ...)
  2023-05-20 16:11 ` [bug#63610] [PATCH 3/3] gnu: guix: Depend on 'graphviz-minimal' Ludovic Courtès
@ 2023-05-24 13:06 ` Ludovic Courtès
  3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-24 13:06 UTC (permalink / raw)
  To: 63610-done

Hi,

Ludovic Courtès <ludo@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-24 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-20 16:01 [bug#63610] [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès
2023-05-20 16:11 ` [bug#63610] [PATCH 1/3] gnu: graphviz: Add "minimal" variant Ludovic Courtès
2023-05-20 16:11 ` [bug#63610] [PATCH 2/3] self: Build against "graphviz-minimal" Ludovic Courtès
2023-05-20 16:11 ` [bug#63610] [PATCH 3/3] gnu: guix: Depend on 'graphviz-minimal' Ludovic Courtès
2023-05-24 13:06 ` bug#63610: [PATCH 0/3] Add 'graphviz-minimal' and have Guix depend on it Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).