summary refs log tree commit diff
path: root/gnu/packages/graphviz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/graphviz.scm')
-rw-r--r--gnu/packages/graphviz.scm117
1 files changed, 51 insertions, 66 deletions
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 5685864d4c..5fa8d5a80c 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 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2021 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 Ricardo Wurmus <rekado@elephly.net>
@@ -33,6 +33,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bison)
@@ -62,48 +63,48 @@
 (define-public graphviz
   (package
     (name "graphviz")
-    (replacement graphviz/fixed)
-    (version "2.42.3")
+    (version "2.48.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://www2.graphviz.org/Packages/stable/portable_source/"
-                    "graphviz-" version ".tar.gz"))
+              (uri (string-append "https://gitlab.com/api/v4/projects/4207231"
+                                  "/packages/generic/graphviz-releases/"
+                                  version "/graphviz-" version ".tar.xz"))
               (sha256
                (base32
-                "1pbswjbx3fjdlsxcm7cmlsl5bvaa3d6gcnr0cr8x3c8pag13zbwg"))))
+                "0lgv508zyfdv4wl95avaj58nmjhbvb5za65nhrkl5nn818ayvggn"))))
     (build-system gnu-build-system)
     (arguments
      ;; FIXME: rtest/rtest.sh is a ksh script (!).  Add ksh as an input.
-     '(#:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'move-docs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (doc (assoc-ref outputs "doc")))
-               (mkdir-p (string-append doc "/share/graphviz"))
-               (rename-file (string-append out "/share/graphviz/doc")
-                            (string-append doc "/share/graphviz/doc"))
-               #t)))
-         (add-after 'move-docs 'move-guile-bindings
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (lib (string-append out "/lib"))
-                    (extdir (string-append lib
-                                           "/guile/2.0/extensions")))
-               (mkdir-p extdir)
-               (rename-file (string-append
-                             lib "/graphviz/guile/libgv_guile.so")
-                            (string-append extdir
-                                           "/libgv_guile.so"))
-               #t))))))
+     (list #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'move-docs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out"))
+                         (doc (assoc-ref outputs "doc")))
+                     (mkdir-p (string-append doc "/share/graphviz"))
+                     (rename-file (string-append out "/share/graphviz/doc")
+                                  (string-append doc "/share/graphviz/doc")))))
+               (add-after 'move-docs 'move-guile-bindings
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out"))
+                          (lib (string-append out "/lib"))
+                          (extdir (string-append lib "/guile/"
+                                                 #$(version-major+minor
+                                                    (package-version
+                                                     (this-package-input "guile")))
+                                                 "/extensions")))
+                     (mkdir-p extdir)
+                     (rename-file (string-append
+                                   lib "/graphviz/guile/libgv_guile.so")
+                                  (string-append extdir
+                                                 "/libgv_guile.so"))))))))
     (inputs
      `(("libXrender" ,libxrender)
        ("libX11" ,libx11)
        ("gts" ,gts)
-       ("gd" ,gd)                                 ; FIXME: Our GD is too old
-       ("guile" ,guile-2.0)                       ;Guile bindings
+       ("gd" ,gd)
+       ("guile" ,guile-3.0)                       ;Guile bindings
        ("pango" ,pango)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
@@ -127,15 +128,6 @@ software engineering, database and web design, machine learning, and in visual
 interfaces for other technical domains.")
     (license license:epl1.0)))
 
-(define-public graphviz/fixed
-  (hidden-package
-    (package
-      (inherit graphviz)
-      (source (origin
-                (inherit (package-source graphviz))
-                (patches (append (search-patches "graphviz-CVE-2020-18032.patch")
-                                 (origin-patches (package-source graphviz)))))))))
-
 ;; Older Graphviz needed for pygraphviz.  See
 ;; https://github.com/pygraphviz/pygraphviz/issues/175
 (define-public graphviz-2.38
@@ -158,19 +150,20 @@ interfaces for other technical domains.")
       (arguments
        (substitute-keyword-arguments (package-arguments graphviz)
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'prepare-bootstrap
-               (lambda _
-                 (substitute* "autogen.sh"
-                   (("/bin/sh") (which "sh"))
-                   (("\\$GRAPHVIZ_VERSION_DATE") "0"))
-                 (setenv "CONFIG_SHELL" (which "sh"))
-                 (setenv "SHELL" (which "sh"))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'prepare-bootstrap
+                (lambda _
+                  (substitute* "autogen.sh"
+                    (("/bin/sh") (which "sh"))
+                    (("\\$GRAPHVIZ_VERSION_DATE") "0"))
+                  (setenv "CONFIG_SHELL" (which "sh"))
+                  (setenv "SHELL" (which "sh"))
 
-                 (map make-file-writable (find-files "." ".*"))
-                 #t))
-             (replace 'bootstrap
-               (lambda _ (invoke (which "sh") "autogen.sh" "NOCONFIG") #t))))))
+                  (map make-file-writable (find-files "." ".*"))
+                  #t))
+              (replace 'bootstrap
+                (lambda _
+                  (invoke (which "sh") "autogen.sh" "NOCONFIG") #t))))))
       (native-inputs
        `(("autoconf" ,autoconf)
          ("automake" ,automake)
@@ -221,7 +214,7 @@ visualization tool suite.")
 (define-public python-pygraphviz
   (package
     (name "python-pygraphviz")
-    (version "1.5")
+    (version "1.7")
     (source
      (origin
        (method git-fetch)
@@ -231,18 +224,14 @@ visualization tool suite.")
        (file-name (string-append "pygraphviz-" version "-checkout"))
        (sha256
         (base32
-         "1yldym38m8ckgflln83i88143pd9fjj1vfp23sq39fs6np5g0nzp"))))
+         "0jqc3dzy9n0hn3b99zq8jp53901zpjzvvi5ns5mbaxg8kdrb1lfx"))))
     (build-system python-build-system)
-    (arguments
-     `(#:configure-flags
-       (let ((graphviz (assoc-ref %build-inputs "graphviz")))
-         (list (string-append "--include-path=" graphviz "/include")
-               (string-append "--library-path=" graphviz "/lib")))))
     (inputs
-     `(("graphviz" ,graphviz-2.38)))
+     `(("graphviz" ,graphviz)))
     (native-inputs
      `(("python-nose" ,python-nose)
        ("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
        ("python-doctest-ignore-unicode" ,python-doctest-ignore-unicode)))
     (home-page "https://pygraphviz.github.io")
     (synopsis "Python interface to Graphviz")
@@ -252,9 +241,6 @@ write, and draw graphs using Python to access the Graphviz graph data
 structure and layout algorithms.")
     (license license:bsd-3)))
 
-(define-public python2-pygraphviz
-  (package-with-python2 python-pygraphviz))
-
 (define-public python-uqbar
   (package
     (name "python-uqbar")
@@ -367,8 +353,7 @@ Graphviz and LaTeX.")
                     ":" (assoc-ref inputs "gdk-pixbuf") "/lib/girepository-1.0"
                     ":" (assoc-ref inputs "atk") "/lib/girepository-1.0")))
                `("PATH" ":" prefix
-                 (,(string-append (assoc-ref inputs "graphviz") "/bin"))))
-             #t)))))
+                 (,(dirname (search-input-file inputs "bin/dot"))))))))))
     (inputs
      `(("atk" ,atk)
        ("gdk-pixbuf" ,gdk-pixbuf+svg)