about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-08-08 09:51:01 +0200
committerPeter Simons <simons@cryp.to>2014-08-08 09:51:01 +0200
commit9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2 (patch)
treee61a7de75f426c942f91da2b0828149631d92957 /pkgs/applications/graphics
parent5c276c4f68125e7d53e0467a3e74969dbd05b51b (diff)
parentbdf5f45356afd6f4289e5e1f497a48c3dc54b38c (diff)
downloadnixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar.gz
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar.bz2
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar.lz
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar.xz
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.tar.zst
nixlib-9226fbf56a28bcc43ceb73773e12fa1e5c3edaa2.zip
Merge remote-tracking branch 'origin/master' into staging.
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/gcolor2/default.nix31
-rw-r--r--pkgs/applications/graphics/gcolor2/gcolor2-amd64.patch46
-rw-r--r--pkgs/applications/graphics/mcomix/default.nix4
3 files changed, 79 insertions, 2 deletions
diff --git a/pkgs/applications/graphics/gcolor2/default.nix b/pkgs/applications/graphics/gcolor2/default.nix
new file mode 100644
index 000000000000..0af750ec989e
--- /dev/null
+++ b/pkgs/applications/graphics/gcolor2/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, gtk, perl, perlXMLParser, pkgconfig } :
+
+let version = "0.4"; in
+stdenv.mkDerivation {
+  name = "gcolor2-${version}";
+  arch = if stdenv.system == "x86_64-linux" then "amd64" else "386";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2";
+    sha1 = "e410a52dcff3d5c6c3d448b68a026d04ccd744be";
+
+  };
+
+  preConfigure = ''
+    sed -i 's/\[:space:\]/[&]/g' configure
+  '';
+
+  # from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches
+  patches = if stdenv.system == "x86_64-linux" then
+        [ ./gcolor2-amd64.patch ] else
+        [ ];
+
+buildInputs = [ gtk perl perlXMLParser pkgconfig ];
+
+  meta = {
+    description = "Simple GTK+2 color selector";
+    homepage = http://gcolor2.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ notthemessiah ];
+  };
+}
diff --git a/pkgs/applications/graphics/gcolor2/gcolor2-amd64.patch b/pkgs/applications/graphics/gcolor2/gcolor2-amd64.patch
new file mode 100644
index 000000000000..cd06a8315f98
--- /dev/null
+++ b/pkgs/applications/graphics/gcolor2/gcolor2-amd64.patch
@@ -0,0 +1,46 @@
+diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gcolor2-0.4.orig/src/callbacks.c gcolor2-0.4/src/callbacks.c
+--- gcolor2-0.4.orig/src/callbacks.c	2005-07-12 14:06:12.000000000 -0400
++++ gcolor2-0.4/src/callbacks.c	2007-02-17 19:19:38.000000000 -0500
+@@ -4,6 +4,9 @@
+ 
+ #include <gtk/gtk.h>
+ #include <stdio.h>
++#include <string.h>
++#include <glib.h>
++#include <glib/gprintf.h>
+ 
+ #include "callbacks.h"
+ #include "interface.h"
+@@ -172,6 +175,9 @@ void on_copy_color_to_clipboard_activate
+ 	gtk_clipboard_set_text (cb, hex, strlen (hex));
+ }
+ 
++void add_rgb_file (gchar *filename, gchar *type);
++gchar* get_system_file (void);
++
+ void on_show_system_colors_activate (GtkMenuItem *menuitem, gpointer user_data)
+ {
+ 	if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menuitem)))
+@@ -266,6 +272,8 @@ void on_save_button_clicked (GtkButton *
+ 	gtk_widget_destroy (savedialog);
+ }
+ 
++void add_list_color (gchar *spec, gchar *name, gchar *type, gboolean is_new_color);
++
+ void add_color_to_treeview ()
+ {
+ 	GtkTreeView      *treeview;
+diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gcolor2-0.4.orig/src/main.c gcolor2-0.4/src/main.c
+--- gcolor2-0.4.orig/src/main.c	2005-07-11 10:55:49.000000000 -0400
++++ gcolor2-0.4/src/main.c	2007-02-17 19:18:23.000000000 -0500
+@@ -4,6 +4,10 @@
+ 
+ #include <gtk/gtk.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <glib.h>
++#include <glib/gprintf.h>
+ 
+ #include "interface.h"
+ #include "support.h"
diff --git a/pkgs/applications/graphics/mcomix/default.nix b/pkgs/applications/graphics/mcomix/default.nix
index c997f5c343fd..cc1fe8c3a220 100644
--- a/pkgs/applications/graphics/mcomix/default.nix
+++ b/pkgs/applications/graphics/mcomix/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildPythonPackage, pygtk, pil }:
+{ stdenv, fetchurl, buildPythonPackage, pygtk, pil, python27Packages }:
 
 buildPythonPackage rec {
     namePrefix = "";
@@ -11,7 +11,7 @@ buildPythonPackage rec {
 
     doCheck = false;
 
-    pythonPath = [ pygtk pil ];
+    pythonPath = [ pygtk pil python27Packages.sqlite3 ];
 
     meta = {
       description = "Image viewer designed to handle comic books";