From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: [PATCH 1/3] gnu: Add xdot. Date: Sat, 26 Nov 2016 16:27:56 +0200 Message-ID: <20161126142758.25457-2-theodoros.for@openmailbox.org> References: <20161126142758.25457-1-theodoros.for@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAe2P-0006Os-PO for guix-devel@gnu.org; Sat, 26 Nov 2016 09:33:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAe2M-0005RW-MP for guix-devel@gnu.org; Sat, 26 Nov 2016 09:33:09 -0500 Received: from smtp17.openmailbox.org ([62.4.1.51]:58315 helo=smtp2.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAe2M-0005RD-B8 for guix-devel@gnu.org; Sat, 26 Nov 2016 09:33:06 -0500 In-Reply-To: <20161126142758.25457-1-theodoros.for@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/graphviz.scm (xdot): New variable. --- gnu/packages/graphviz.scm | 52 +++++++++++++++++++++++++++++++++++++++++= +++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 610bd16..a336183 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2015 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2015 Efraim Flashner +;;; Copyright =C2=A9 2016 Theodoros Foradis ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages graphviz) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix download) #:use-module (gnu packages xorg) #:use-module (gnu packages gtk) @@ -30,11 +32,14 @@ #:use-module (gnu packages image) #:use-module (gnu packages autotools) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gnome) #:use-module (gnu packages fontutils) #:use-module (gnu packages compression) #:use-module (gnu packages gd) #:use-module (gnu packages swig) - #:use-module ((guix licenses) #:select (lgpl2.0+ epl1.0))) + #:use-module ((guix licenses) #:select (lgpl2.0+ epl1.0 lgpl3+))) =20 (define-public graphviz (package @@ -148,3 +153,48 @@ interfaces for other technical domains.") "Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles.") (license lgpl2.0+))) + +(define-public xdot + (package + (name "xdot") + (version "0.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "xdot" version)) + (sha256 + (base32 + "1q0f3pskb09saw1qkd2s6vmk80rq5zjhq8l93dfr2x6r04r0q46j")))) + (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") "/bi= n/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/gireposito= ry-1.0" + ":" (assoc-ref inputs "atk") "/lib/girepository-1.0"= ))) + `("PATH" ":" prefix + (,(string-append (assoc-ref inputs "graphviz") "/bin"))= )) + #t))))) + (inputs + `(("atk" ,atk) + ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("graphviz" ,graphviz) + ("gtk+" ,gtk+) + ("python-pycairo" ,python-pycairo) + ("python-pygobject" ,python-pygobject))) + (home-page "https://pypi.python.org/pypi/xdot") + (synopsis + "Interactive viewer for graphviz dot files") + (description + "Xdot is an interactive viewer for graphs written in @code{graphviz= }=E2=80=99s dot language. + It uses internally the xdot output format as an intermediate format,an= d @code{gtk} and +@code{cairo} for rendering. Xdot can be used either as a standalone app= lication, or as +a python library.") + (license lgpl3+))) --=20 2.10.2