Subject: [bug#65012] [PATCH v2 2/2] gnu: Add picket.

From: Sergio Pastor Pérez <[email-masked]>
Date: Sun, 10 Sep 2023 17:42:06 +0200

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

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index f84af81384..ad53c8e5a2 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1948,6 +1948,50 @@ (define-public mini
      "This is a tiny, header only C++ library for manipulating INI files.")
     (license license:expat)))
 
+(define-public picket
+  (package
+    (name "picket")
+    (version "1.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rajter/picket")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1zhpynyakjx9nc51b1j80b4y3138p3l380kp1cqmmjx2n9430144"))
+              (snippet '(begin
+                          ;; bundled mINI header library.
+                          (delete-file "src/cfg/ini.h")))))
+    (native-inputs (list pkg-config))
+    (inputs (list gtkmm-3 mini))
+    (arguments
+     (list #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'fix-mini-includes
+                          (lambda _
+                            (substitute* '("src/cfg/config.h"
+                                           "src/cfg/config.cpp")
+                              (("#include \"ini.h\"")
+                               "#include \"mini/ini.h\""))
+                            (substitute* "src/main.cpp"
+                              (("/usr")
+                               #$output))))
+                        (add-after 'unpack 'fix-cmake-paths
+                          (lambda _
+                            (substitute* "CMakeLists.txt"
+                              (("src/cfg/ini.h")
+                               (string-append #$mini "/include/mini/ini.h"))
+                              (("/usr/")
+                               #$output)))))))
+    (build-system cmake-build-system)
+    (home-page "https://github.com/rajter/picket")
+    (synopsis "Native linux screen color picker with custom format output")
+    (description
+     "Screen color picker for linux with magnifier and custom/user defined formats.")
+    (license license:gpl3+)))
+
 (define-public gpick
   (package
     (name "gpick")
-- 
2.41.0