summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/3.18/core/gtksourceview
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome-3/3.18/core/gtksourceview')
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gtksourceview/default.nix22
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gtksourceview/nix_share_path.patch11
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gtksourceview/src.nix10
3 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome-3/3.18/core/gtksourceview/default.nix b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/default.nix
new file mode 100644
index 00000000000..ea95e39e5b2
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, atk, cairo, glib, gtk3, pango
+, libxml2Python, perl, intltool, gettext, gnome3 }:
+
+stdenv.mkDerivation rec {
+  inherit (import ./src.nix fetchurl) name src;
+
+  propagatedBuildInputs = [ gtk3 ];
+
+  buildInputs = [ pkgconfig atk cairo glib pango
+                  libxml2Python perl intltool gettext ];
+
+  preBuild = ''
+    substituteInPlace gtksourceview/gtksourceview-utils.c --replace "@NIX_SHARE_PATH@" "$out/share"
+  ''; 
+
+  patches = [ ./nix_share_path.patch ];
+
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    maintainers = gnome3.maintainers;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/3.18/core/gtksourceview/nix_share_path.patch b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/nix_share_path.patch
new file mode 100644
index 00000000000..c87350167c2
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/nix_share_path.patch
@@ -0,0 +1,11 @@
+--- a/gtksourceview/gtksourceview-utils.c	2014-07-13 16:13:57.418687726 +0200
++++ b/gtksourceview/gtksourceview-utils.c	2014-07-13 16:14:20.550847767 +0200
+@@ -68,6 +68,8 @@
+ 							 basename,
+ 							 NULL));
+ 
++        g_ptr_array_add (dirs, g_build_filename ("@NIX_SHARE_PATH@", SOURCEVIEW_DIR, basename, NULL));
++
+ 	g_ptr_array_add (dirs, NULL);
+ 
+ 	return (gchar**) g_ptr_array_free (dirs, FALSE);
diff --git a/pkgs/desktops/gnome-3/3.18/core/gtksourceview/src.nix b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/src.nix
new file mode 100644
index 00000000000..5bbd2c42474
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.18/core/gtksourceview/src.nix
@@ -0,0 +1,10 @@
+# Autogenerated by maintainers/scripts/gnome.sh update
+
+fetchurl: {
+  name = "gtksourceview-3.18.0";
+
+  src = fetchurl {
+    url = mirror://gnome/sources/gtksourceview/3.18/gtksourceview-3.18.0.tar.xz;
+    sha256 = "54b111264e6985e26a878dec88ff94fd0a9ae0dc4cfcdf08f4a6b5f655d4b693";
+  };
+}