summary refs log tree commit diff
path: root/gnu/packages/xdisorg.scm
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-04 19:53:37 +0300
committerAlex Kost <alezost@gmail.com>2016-04-14 10:32:56 +0300
commit5c93de733789e328c2e25a11d4d32889ec6bf033 (patch)
tree3e658b919a3d6f09906dd96fb77b94ea18efbaa7 /gnu/packages/xdisorg.scm
parent9f1d33be33b647c9d0c60e8a3dd71c6cbc37adf1 (diff)
downloadguix-5c93de733789e328c2e25a11d4d32889ec6bf033.tar.gz
gnu: Add maim.
* gnu/packages/xdisorg.scm (maim): New variable.
Diffstat (limited to 'gnu/packages/xdisorg.scm')
-rw-r--r--gnu/packages/xdisorg.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index c8e4beb0b6..a999857ecb 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -412,6 +412,48 @@ window) while drawing a pretty box around it, then finally prints the
 selection's dimensions to stdout.")
     (license license:gpl3+)))
 
+(define-public maim
+  (package
+    (name "maim")
+    (version "3.4.47")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/naelstrof/maim/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0kfp7k55bxc5h6h0wv8bwmsc5ny66h9ra2z4dzs4yzszq16544pv"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f              ; no "check" target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((slop (string-append (assoc-ref inputs "slop")
+                                        "/bin/slop")))
+               ;; "slop" command is hardcoded in the source; replace it
+               ;; with the full file name.
+               (substitute* "src/main.cpp"
+                 (("^( +slopcommand.*)\"slop\"" all front)
+                  (string-append front "\"" slop "\"")))))))))
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxrandr" ,libxrandr)
+       ("libxfixes" ,libxfixes)
+       ("imlib2" ,imlib2)
+       ("slop" ,slop)))
+    (home-page "https://github.com/naelstrof/maim")
+    (synopsis "Screenshot utility for X Window System")
+    (description
+     "maim (Make Image) is a tool that takes screenshots of your desktop and
+saves it in any format.  Along with a full screen, it allows you to capture a
+predefined region or a particular window.  Also, it makes it possible to
+include cursor in the resulting image.")
+    (license license:gpl3+)))
+
 (define-public unclutter
   (package
     (name "unclutter")