GNU bug report logs -
#70406
[PATCH] gnu: xdot: Update to 1.3.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70406 in the body.
You can then email your comments to 70406 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#70406
; Package
guix-patches
.
(Mon, 15 Apr 2024 20:04:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 15 Apr 2024 20:04:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/graphviz.scm (xdot): Update to 1.3.
[source]: Download the sources from GitHub as the PyPI tarbal is missing
some test files.
[arguments]: Use Gexps. Add "start-xserver" and "set-test-environment"
to setup test environment properly. Simplify "wrap" phase. Replace "check"
phase to run "test.py".
[native-inputs]: Add "gobject-introspection" and "xorg-server-for-tests".
[inputs]: Add "bash-minimal", "mesa", "mesa-opencl", "python-numpy"
and "vulkan-loader".
Change-Id: I7a68e9f5c1b66a6539b83623a457e16edacff012
---
gnu/packages/graphviz.scm | 94 ++++++++++++++++++++++++++-------------
1 file changed, 64 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index c5507e036c..0fc5c6024e 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Giacomo Leidi <goodoldpaul <at> autistici.org>
;;; Copyright © 2021 Justin Veilleux <terramorpha <at> cock.li>
;;; Copyright © 2021 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,11 +41,13 @@ (define-module (gnu packages graphviz)
#:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gd)
+ #:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
@@ -58,6 +61,7 @@ (define-module (gnu packages graphviz)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages swig)
#:use-module (gnu packages tex)
+ #:use-module (gnu packages vulkan)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module ((guix licenses) #:prefix license:))
@@ -273,42 +277,72 @@ (define-public gts
(define-public xdot
(package
(name "xdot")
- (version "1.1")
+ (version "1.3")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "xdot" version))
- (sha256
- (base32
- "0cr4rh7dz4dfzyxrk5pzhm0d15gkrgkfp3i5lw178xy81pc56p71"))))
+ ;; PyPI tarball is missing some test files.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jrfonseca/xdot.py/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00j147183yf6wp1rnlp26vvsnsz5v56qgffdpd2ijkpvphvyyiyi"))))
(build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; We wrap xdot, so that we don't propagate gtk+ and graphviz
- (add-after 'install 'wrap
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (wrap-program (string-append (assoc-ref outputs "out") "/bin/xdot")
- `("GI_TYPELIB_PATH" ":" prefix
- (,(string-append
- (assoc-ref inputs "gtk+") "/lib/girepository-1.0"
- ":" (assoc-ref inputs "pango") "/lib/girepository-1.0"
- ":" (assoc-ref inputs "gdk-pixbuf") "/lib/girepository-1.0"
- ":" (assoc-ref inputs "at-spi2-core") "/lib/girepository-1.0"
- ":" (assoc-ref inputs "harfbuzz") "/lib/girepository-1.0")))
- `("PATH" ":" prefix
- (,(dirname (search-input-file inputs "bin/dot"))))))))))
- (inputs
- (list at-spi2-core
- (librsvg-for-system)
- harfbuzz
- graphviz
- gtk+
- python-pycairo
- python-pygobject))
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'start-xserver
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((Xvfb (search-input-file (or native-inputs inputs)
+ "/bin/Xvfb")))
+ (system (format #f "~a :1 -screen 0 640x480x24 &"
+ Xvfb))
+ (setenv "DISPLAY" ":1"))))
+ (add-before 'check 'set-test-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((lib (search-input-file inputs
+ "lib/libvulkan.so.1")))
+ (setenv "XDG_RUNTIME_DIR"
+ (getcwd))
+ (setenv "LIBGL_ALWAYS_SOFTWARE" "1")
+ (format (current-error-port) "~a~%"
+ (assoc-ref inputs "gtk+"))
+ (setenv "LD_LIBRARY_PATH"
+ (dirname lib)))))
+ ;; We wrap xdot, so that we don't propagate gtk+ and graphviz
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
+ (python-path (getenv "GUIX_PYTHONPATH")))
+ (wrap-program (string-append out "/bin/xdot")
+ `("GI_TYPELIB_PATH" ":" prefix
+ (,gi-typelib-path))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,python-path))))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "test.py")))))))
+ (native-inputs (list gobject-introspection xorg-server-for-tests))
+ (inputs (list at-spi2-core
+ bash-minimal
+ (librsvg-for-system)
+ mesa
+ mesa-opencl
+ harfbuzz
+ graphviz
+ gtk+
+ python-numpy
+ python-pycairo
+ python-pygobject
+ vulkan-loader))
(home-page "https://pypi.org/project/xdot/")
(synopsis "Interactive viewer for graphviz dot files")
- (description "Xdot is an interactive viewer for graphs written in
+ (description
+ "Xdot is an interactive viewer for graphs written in
@code{graphviz}’s dot language. Internally, it uses the xdot output format as
an intermediate format, and @code{gtk} and @code{cairo} for rendering. Xdot
can be used either as a standalone application, or as a Python library.")
base-commit: a54e9abdfb551a08beb41c66fbb2c7f7e970250a
--
2.41.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 01 May 2024 20:57:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 01 May 2024 20:57:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 70406-done <at> debbugs.gnu.org (full text, mbox):
Hi Artyom,
"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com> skribis:
> * gnu/packages/graphviz.scm (xdot): Update to 1.3.
> [source]: Download the sources from GitHub as the PyPI tarbal is missing
> some test files.
> [arguments]: Use Gexps. Add "start-xserver" and "set-test-environment"
> to setup test environment properly. Simplify "wrap" phase. Replace "check"
> phase to run "test.py".
> [native-inputs]: Add "gobject-introspection" and "xorg-server-for-tests".
> [inputs]: Add "bash-minimal", "mesa", "mesa-opencl", "python-numpy"
> and "vulkan-loader".
>
> Change-Id: I7a68e9f5c1b66a6539b83623a457e16edacff012
Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 30 May 2024 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.