Subject: add gpick

From: Julien Lepiller <[email-masked]>
Date: Sun, 30 Jul 2017 10:57:41 +0200

Hi, this patch adds gpick, a color picker tool.

>From 3bc2ad1a12ae3417e7ad7068d938eeafe1018508 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <[email-masked]>
Date: Sun, 30 Jul 2017 10:56:38 +0200
Subject: [PATCH] gnu: Add gpick.

* gnu/packages/image.scm (gpick): New variable.
---
 gnu/packages/image.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 139be6281..c0f287215 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -48,6 +48,8 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mcrypt)
   #:use-module (gnu packages perl)
@@ -1158,3 +1160,46 @@ medical image data, e.g. magnetic resonance image (MRI) and functional MRI
 (fMRI) brain images.")
     (home-page "http://niftilib.sourceforge.net")
     (license license:public-domain)))
+
+(define-public gpick
+  (package
+    (name "gpick")
+    (version "0.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/thezbyg/gpick/archive/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0mxvxk15xhk2i5vfavjhnkk4j3bnii0gpf8di14rlbpq070hd5rs"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("scons" ,scons)))
+    (inputs
+     `(("gtk2" ,gtk+-2)
+       ("lua" ,lua-5.2)
+       ("expat" ,expat)
+       ("boost" ,boost)
+       ("gettext" ,gnu-gettext)))
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-lua-reference
+           (lambda _
+             (substitute* "SConscript"
+               (("lua5.2") "lua-5.2"))))
+         (replace 'build
+           (lambda _
+             (zero? (system* "scons"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (setenv "DESTDIR" (assoc-ref outputs "out"))
+             (zero? (system* "scons" "install"
+                             (string-append "DESTDIR=" (assoc-ref outputs "out")))))))))
+    (home-page "http://www.gpick.org/")
+    (synopsis "Color picker")
+    (description "Gpick is an advanced color picker and palette editing tool.")
+    (license license:bsd-3)))
-- 
2.13.3