From c900f84307c64c00eb02754d127759d751e3c4bb Mon Sep 17 00:00:00 2001 From: David Hashe Date: Sun, 8 Nov 2015 13:51:46 -0600 Subject: gnu: Add gtksourceview. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gtk.scm (gtksourceview): Rename to... (gtksourceview-2): ... this. (gtksourceview): Update to 3.18.1. * gnu/packages/ocaml.scm (lablgtk)[inputs]: Replace "gtksourceview" with "gtksourceview-2". Co-authored-by: 宋文武 --- gnu/packages/gtk.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- gnu/packages/ocaml.scm | 3 ++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 3ae2d70af9..edfdb3fe7d 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 Andy Wingo +;;; Copyright © 2015 David Hashe ;;; ;;; This file is part of GNU Guix. ;;; @@ -277,7 +278,7 @@ graph-like environments, e.g. modular synths or finite state machine diagrams.") (license license:gpl3+))) -(define-public gtksourceview +(define-public gtksourceview-2 (package (name "gtksourceview") (version "2.10.5") ; This is the last version which builds against gtk+2 @@ -331,6 +332,54 @@ printing and other features typical of a source code editor.") (license license:lgpl2.0+) (home-page "https://developer.gnome.org/gtksourceview/"))) +(define-public gtksourceview + (package + (name "gtksourceview") + (version "3.18.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1rpdg8rcjlqv8yk13vsh5148mads0zbfih8cak3hm7wb0spmzsbv")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before + 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + (let ((xorg-server (assoc-ref inputs "xorg-server"))) + ;; Tests require a running X server. + (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) + (setenv "DISPLAY" ":1") + ;; For the missing /etc/machine-id. + (setenv "DBUS_FATAL_WARNINGS" "0") + #t)))))) + (native-inputs + `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc. + ("intltool" ,intltool) + ("itstool", itstool) + ("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("vala" ,vala) + ;; For testing. + ("xorg-server" ,xorg-server) + ("shared-mime-info" ,shared-mime-info))) + (propagated-inputs + ;; gtksourceview-3.0.pc refers to all these. + `(("glib" ,glib) + ("gtk+" ,gtk+) + ("libxml2" ,libxml2))) + (home-page "https://wiki.gnome.org/Projects/GtkSourceView") + (synopsis "GNOME source code widget") + (description "GtkSourceView is a text widget that extends the standard +GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax +highlighting and other features typical of a source code editor.") + (license license:lgpl2.1+))) + (define-public gdk-pixbuf (package (name "gdk-pixbuf") diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index ee4e7830b6..7f80fc8a32 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2015 David Hashe ;;; ;;; This file is part of GNU Guix. ;;; @@ -453,7 +454,7 @@ provers.") ;; and gtk+-quartz-2.0 once available. (inputs `(("gtk+" ,gtk+-2) - ("gtksourceview" ,gtksourceview) + ("gtksourceview" ,gtksourceview-2) ("libgnomecanvas" ,libgnomecanvas) ("libgnomeui" ,libgnomeui) ("libglade" ,libglade) -- cgit 1.4.1