On Sun, Nov 8, 2015 at 11:53 AM, Efraim Flashner <efr...@flashner.co.il>
wrote:

> On Sun, 8 Nov 2015 18:47:26 +0100
> John Darrington <j...@darrington.wattle.id.au> wrote:
>
> > Doesn't this already exist ?  In gnu/packages/gtk+
> >
> > The version there seems to be better too, because it doesn't disable the
> tests.
> >
> That one is 2.10.5, and this one is 3.16.1. Although it would make sense to
> put them both in the same file.
>

I've moved it to gtk.scm and renamed 2.10.5 to gtksourceview-2.

I got the code to enable an X server working, but it later failed with
"D-Bus library appears to be incorrectly set up". I don't think we've found
a solution to that problem yet, since there are other packages that have
tests disabled for the same reason.


>
> --
> Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
From 3f71e4c87f0d621dcf019c7c330b182ecc290f71 Mon Sep 17 00:00:00 2001
From: David Hashe <david.ha...@dhashe.com>
Date: Sun, 8 Nov 2015 13:51:46 -0600
Subject: [PATCH 1/3] gnu: Add gtksourceview.

* 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".
---
 gnu/packages/gtk.scm   | 44 +++++++++++++++++++++++++++++++++++++++++++-
 gnu/packages/ocaml.scm |  3 ++-
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index a01e6d0..171e905 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Paul van der Walt <p...@denknerd.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzs...@gmail.com>
 ;;; Copyright © 2015 Andy Wingo <wi...@igalia.com>
+;;; Copyright © 2015 David Hashe <david.ha...@dhashe.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
@@ -275,7 +277,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
@@ -329,6 +331,46 @@ 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 glib-or-gtk-build-system)
+   (arguments
+     ;; Tries to open graphical display during testing and fails.
+     ;; When using the X server trickery from gtksourceview-2, fails with:
+     ;; D-Bus library appears to be incorrectly set up; failed to read
+     ;; machine uuid: Failed to open "/etc/machine-id": No such file or
+     ;; directory.
+     ;; See the manual page for dbus-uuidgen to correct this issue.
+    '(#:tests? #f))
+   (native-inputs
+    `(("intltool" ,intltool)
+      ("itstool", itstool)
+      ("gobject-introspection" ,gobject-introspection)
+      ("pkg-config" ,pkg-config)))
+   (inputs
+    `(("glib" ,glib)
+      ("gtk+" ,gtk+)
+      ("libxml2" ,libxml2)
+      ("pango" ,pango)
+      ("gdk-pixbuf" ,gdk-pixbuf)
+      ("vala" ,vala)))
+   (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 fc45805..b0cc145 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013 Cyril Roelandt <tipec...@gmail.com>
 ;;; Copyright © 2014, 2015 Mark H Weaver <m...@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andr...@enge.fr>
+;;; Copyright © 2015 David Hashe <david.ha...@dhashe.com>
 ;;;
 ;;; 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)
-- 
1.9.1

Reply via email to