From unknown Sun Jun 22 08:06:56 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#70406] [PATCH] gnu: xdot: Update to 1.3. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Apr 2024 20:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70406 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70406@debbugs.gnu.org Cc: "Artyom V. Poptsov" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17132113889474 (code B ref -1); Mon, 15 Apr 2024 20:04:03 +0000 Received: (at submit) by debbugs.gnu.org; 15 Apr 2024 20:03:08 +0000 Received: from localhost ([127.0.0.1]:39325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwSXh-0002SM-GX for submit@debbugs.gnu.org; Mon, 15 Apr 2024 16:03:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwSXe-0002R2-4l for submit@debbugs.gnu.org; Mon, 15 Apr 2024 16:03:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwSXB-0008MF-T4 for guix-patches@gnu.org; Mon, 15 Apr 2024 16:02:39 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwSX4-0005kM-J6 for guix-patches@gnu.org; Mon, 15 Apr 2024 16:02:28 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5171a529224so4593459e87.0 for ; Mon, 15 Apr 2024 13:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713211344; x=1713816144; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8ZVKIl8PUBpAoJyzewwPPn82xrVnSg56kBKmD8cgd7c=; b=BNfWz1KfBEDErH1JPDXDp9m8u4p9JiB4s8d1Udbuh+s8sFM9eodhEw/A2jhza/L2wc oU+4UTUt6B5AK8IvCMKI2Fe231UGdsL1R41MlNZxyYRjd7rwmYSOMR8EgomVNNMSlNPB qsJMprdCFEfejQXTmOuIuEI0HIdvtBU+TyyHrFhuQK1D0BaQJCBTb/EWCbCvFDLgk6Gj eoxLqvPGxypzDwt1s8hIJSzv5FtDWsXM9YhvhK559pxc5xnVKDYV/3eU6AtqWMfF9k7R /vy6owzuJIgf9suLAuOl6r9kDVIjGC2zRVXGqOU4WMW5bXg6j3HRrdIZRIEoWvpNgwRG 2CBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713211344; x=1713816144; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8ZVKIl8PUBpAoJyzewwPPn82xrVnSg56kBKmD8cgd7c=; b=fKbsTXUacz6n1vxSH5DWk4kvQ74n2gfOvNrdm5VLCYs+49gslTv8FT/gxlr8qQdhvC KR0Vm1yhW285IunZKzIBprS5977HxJRJeqBS2xDlcbex+NI2PdtQONhIp7frYEXD/LRX 4V2ko3UA+x+rqedueIrZgeQijN+raYNZgSAIuU7LHUaByeuStMo32nfGlfY20RPS4D3x gN73DEiIIGwZdmG1wibZ+/NzrMMFhqgGb3W9iO01YpiGVe+rU+ZWnwxVOHQLX9t9x1T6 tdPESvuPaLufAxF0IyHWF6r6QXOo96fGkiTFTcNfwjFvOG8JttAN93UH5UrlSqqrQ18b 9NNA== X-Gm-Message-State: AOJu0YzYJt2Df/JJE0mVNHwdf7f6W8HZZdq58Jpvp6OJdqUvZ+DtraRr DPAuKKE7jDQrKSRauUfDIpYMJcWYqoqZj4DDtWbZmII36dF1wyheuuq0jQ== X-Google-Smtp-Source: AGHT+IGRdO4I+vT2OvxdojdWN22KyPy3jIWn7vmCjdFVzvTLyK2Z+str41CV8D9LRw8ej5ngUSGp0A== X-Received: by 2002:a05:651c:1994:b0:2d8:394c:6e7e with SMTP id bx20-20020a05651c199400b002d8394c6e7emr7234850ljb.15.1713211343988; Mon, 15 Apr 2024 13:02:23 -0700 (PDT) Received: from elephant.. ([5.166.209.213]) by smtp.gmail.com with ESMTPSA id f15-20020a2e6a0f000000b002d868f2939bsm1298551ljc.103.2024.04.15.13.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 13:02:23 -0700 (PDT) From: "Artyom V. Poptsov" Date: Mon, 15 Apr 2024 23:02:09 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * 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 ;;; Copyright © 2021 Justin Veilleux ;;; Copyright © 2021 Denis 'GNUtoo' Carikli +;;; Copyright © 2024 Artyom V. Poptsov ;;; ;;; 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 From unknown Sun Jun 22 08:06:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Artyom V. Poptsov" Subject: bug#70406: closed (Re: [bug#70406] [PATCH] gnu: xdot: Update to 1.3.) Message-ID: References: <87plu545hq.fsf@gnu.org> X-Gnu-PR-Message: they-closed 70406 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 70406@debbugs.gnu.org Date: Wed, 01 May 2024 20:57:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1714597022-2950-1" This is a multi-part message in MIME format... ------------=_1714597022-2950-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #70406: [PATCH] gnu: xdot: Update to 1.3. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 70406@debbugs.gnu.org. --=20 70406: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70406 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1714597022-2950-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 70406-done) by debbugs.gnu.org; 1 May 2024 20:56:23 +0000 Received: from localhost ([127.0.0.1]:39409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2H02-0000lH-UY for submit@debbugs.gnu.org; Wed, 01 May 2024 16:56:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2H01-0000l3-AK for 70406-done@debbugs.gnu.org; Wed, 01 May 2024 16:56:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2GzZ-0002Zf-An; Wed, 01 May 2024 16:55:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=x4rSBB9R/laRbBKTtd/8GQ3TgoeIUjDKYFksCmR4Xa8=; b=X+9/7jnA8/qz+EN12RbY A9juCHfAK/5jyxnUTsyH+AyHFOLW5VQdkzpPXAo6RmJwyLF6ApqfsQzcXy7QrlPFn1ZCXNv0M9F8b s03bxCxn1m7KIKTwQ/dCiPwurkHObfRn6O/4o9TH7vTTX6hPiWUlSWHo1BJfUmvZoYm6Gi7shPQtx a+ZCrpecBfg3sVGpYR9YtNPXd8lhkkmznqCW7Crfi6QdactWdW5MIQxMIv+DWUflokyXwfk8i5lxA yZzJ5LNkMX9jiROFuKim5Zy0cOLWcv4eOzYPrHdTL9xQNzXt/aZdFdsGOOsFeaw16l+K2VeNnwqNb 0IGM9rkpkk8l0A==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Artyom V. Poptsov" Subject: Re: [bug#70406] [PATCH] gnu: xdot: Update to 1.3. In-Reply-To: (Artyom V. Poptsov's message of "Mon, 15 Apr 2024 23:02:09 +0300") References: Date: Wed, 01 May 2024 22:55:13 +0200 Message-ID: <87plu545hq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70406-done Cc: 70406-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Artyom, "Artyom V. Poptsov" 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 "c= heck" > 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=E2=80=99. ------------=_1714597022-2950-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Apr 2024 20:03:08 +0000 Received: from localhost ([127.0.0.1]:39325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwSXh-0002SM-GX for submit@debbugs.gnu.org; Mon, 15 Apr 2024 16:03:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwSXe-0002R2-4l for submit@debbugs.gnu.org; Mon, 15 Apr 2024 16:03:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwSXB-0008MF-T4 for guix-patches@gnu.org; Mon, 15 Apr 2024 16:02:39 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwSX4-0005kM-J6 for guix-patches@gnu.org; Mon, 15 Apr 2024 16:02:28 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5171a529224so4593459e87.0 for ; Mon, 15 Apr 2024 13:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713211344; x=1713816144; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8ZVKIl8PUBpAoJyzewwPPn82xrVnSg56kBKmD8cgd7c=; b=BNfWz1KfBEDErH1JPDXDp9m8u4p9JiB4s8d1Udbuh+s8sFM9eodhEw/A2jhza/L2wc oU+4UTUt6B5AK8IvCMKI2Fe231UGdsL1R41MlNZxyYRjd7rwmYSOMR8EgomVNNMSlNPB qsJMprdCFEfejQXTmOuIuEI0HIdvtBU+TyyHrFhuQK1D0BaQJCBTb/EWCbCvFDLgk6Gj eoxLqvPGxypzDwt1s8hIJSzv5FtDWsXM9YhvhK559pxc5xnVKDYV/3eU6AtqWMfF9k7R /vy6owzuJIgf9suLAuOl6r9kDVIjGC2zRVXGqOU4WMW5bXg6j3HRrdIZRIEoWvpNgwRG 2CBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713211344; x=1713816144; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8ZVKIl8PUBpAoJyzewwPPn82xrVnSg56kBKmD8cgd7c=; b=fKbsTXUacz6n1vxSH5DWk4kvQ74n2gfOvNrdm5VLCYs+49gslTv8FT/gxlr8qQdhvC KR0Vm1yhW285IunZKzIBprS5977HxJRJeqBS2xDlcbex+NI2PdtQONhIp7frYEXD/LRX 4V2ko3UA+x+rqedueIrZgeQijN+raYNZgSAIuU7LHUaByeuStMo32nfGlfY20RPS4D3x gN73DEiIIGwZdmG1wibZ+/NzrMMFhqgGb3W9iO01YpiGVe+rU+ZWnwxVOHQLX9t9x1T6 tdPESvuPaLufAxF0IyHWF6r6QXOo96fGkiTFTcNfwjFvOG8JttAN93UH5UrlSqqrQ18b 9NNA== X-Gm-Message-State: AOJu0YzYJt2Df/JJE0mVNHwdf7f6W8HZZdq58Jpvp6OJdqUvZ+DtraRr DPAuKKE7jDQrKSRauUfDIpYMJcWYqoqZj4DDtWbZmII36dF1wyheuuq0jQ== X-Google-Smtp-Source: AGHT+IGRdO4I+vT2OvxdojdWN22KyPy3jIWn7vmCjdFVzvTLyK2Z+str41CV8D9LRw8ej5ngUSGp0A== X-Received: by 2002:a05:651c:1994:b0:2d8:394c:6e7e with SMTP id bx20-20020a05651c199400b002d8394c6e7emr7234850ljb.15.1713211343988; Mon, 15 Apr 2024 13:02:23 -0700 (PDT) Received: from elephant.. ([5.166.209.213]) by smtp.gmail.com with ESMTPSA id f15-20020a2e6a0f000000b002d868f2939bsm1298551ljc.103.2024.04.15.13.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 13:02:23 -0700 (PDT) From: "Artyom V. Poptsov" To: guix-patches@gnu.org Subject: [PATCH] gnu: xdot: Update to 1.3. Date: Mon, 15 Apr 2024 23:02:09 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: "Artyom V. Poptsov" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * 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 ;;; Copyright © 2021 Justin Veilleux ;;; Copyright © 2021 Denis 'GNUtoo' Carikli +;;; Copyright © 2024 Artyom V. Poptsov ;;; ;;; 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 ------------=_1714597022-2950-1--