1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
5 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
7 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
8 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages image-viewers)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix download)
29 #:use-module (guix packages)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system python)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages graphics)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages imagemagick)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages photo)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages python)
50 #:use-module (gnu packages qt)
51 #:use-module (gnu packages xorg)
52 #:use-module (gnu packages))
58 (home-page "https://feh.finalrewind.org/")
61 (uri (string-append home-page
62 name "-" version ".tar.bz2"))
65 "02vhdv16nf4kjna4inpbfy4k3p40bhl7xpc4kh4xvily14146l2b"))))
66 (build-system gnu-build-system)
68 '(#:phases (modify-phases %standard-phases (delete 'configure))
69 #:tests? #f ;FIXME: Requires 'perl-test-command'.
71 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))))
72 (inputs `(("imlib2" ,imlib2)
77 ("libxinerama" ,libxinerama)))
78 (synopsis "Fast and light imlib2-based image viewer")
80 "feh is an X11 image viewer aimed mostly at console users.
81 Unlike most other viewers, it does not have a fancy GUI, but simply
82 displays images. It can also be used to set the desktop wallpaper.
83 It is controlled via commandline arguments and configurable key/mouse
86 ;; The license is really the Expat license, with additional wording in the
87 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
88 ;; software packages that this Software was used."
89 (license (license:x11-style
91 "See 'COPYING' in the distribution."))))
99 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
100 "releases/download/v" version "/geeqie-"
104 "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb"))))
105 (build-system gnu-build-system)
107 `(;; Enable support for a "map" pane using GPS data.
108 #:configure-flags '("--enable-map")
111 (modify-phases %standard-phases
112 (add-after 'unpack 'autogen
114 (setenv "NOCONFIGURE" "true")
115 (zero? (system* "sh" "autogen.sh")))))))
117 `(("clutter" ,clutter)
118 ("libchamplain" ,libchamplain)
124 `(("autoconf" ,autoconf)
125 ("automake" ,automake)
126 ("glib" ,glib "bin") ; glib-gettextize
127 ("intltool" ,intltool)
128 ("pkg-config" ,pkg-config)))
129 (home-page "http://www.geeqie.org/")
130 (synopsis "Lightweight GTK+ based image viewer")
132 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
133 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
134 interoperability; easy integration with other software; geeqie works on files
135 and directories, there is no need to import images; fast preview for many raw
136 image formats; tools for image comparison, sorting and managing photo
137 collection. Geeqie was initially based on GQview.")
138 (license license:gpl2+)))
140 (define-public gpicview
146 (uri (string-append "mirror://sourceforge/lxde/"
147 "GPicView%20%28image%20Viewer%29/0.2.x/"
148 name "-" version ".tar.xz"))
151 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
152 (build-system gnu-build-system)
153 (inputs `(("gtk+" ,gtk+-2)
154 ("libjpeg" ,libjpeg)))
155 (native-inputs `(("intltool" ,intltool)
156 ("pkg-config" ,pkg-config)))
157 (synopsis "Simple and fast image viewer for X")
158 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
159 It is the default image viewer on LXDE desktop environment.")
160 (home-page "http://lxde.sourceforge.net/gpicview/")
161 (license license:gpl2+)))
170 "https://github.com/muennich/sxiv/archive/v"
172 (file-name (string-append name "-" version ".tar.gz"))
175 "0lxnd33gaw4drhdwbkk94wzrjyhh64d57jq2ps7ffmqgizg6hlwz"))))
176 (build-system gnu-build-system)
178 '(#:tests? #f ; no check target
179 #:make-flags (list (string-append "PREFIX=" %output)
181 ;; no configure phase
182 #:phases (modify-phases %standard-phases (delete 'configure))))
187 ("libexif" ,libexif)))
188 (home-page "https://github.com/muennich/sxiv")
189 (synopsis "Simple X Image Viewer")
191 "sxiv is an alternative to feh and qiv. Its primary goal is to
192 provide the most basic features required for fast image viewing. It has
193 vi key bindings and works nicely with tiling window managers. Its code
194 base should be kept small and clean to make it easy for you to dig into
195 it and customize it for your needs.")
196 (license license:gpl2+)))
198 (define-public viewnior
205 (uri (string-append "https://github.com/xsisqox/Viewnior/archive/"
206 name "-" version ".tar.gz"))
209 "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9"))))
210 (build-system gnu-build-system)
213 (modify-phases %standard-phases
214 (add-after 'unpack 'autogen
216 (zero? (system* "sh" "autogen.sh"))))
217 (add-before 'install 'skip-gtk-update-icon-cache
219 ;; Don't create 'icon-theme.cache'
220 (substitute* (find-files "data" "^Makefile$")
221 (("gtk-update-icon-cache") (which "true")))
224 `(("automake" ,automake)
225 ("autoconf" ,autoconf)
226 ("intltool" ,intltool)
227 ("glib" ,glib "bin") ; glib-genmarshal
228 ("gnome-common" ,gnome-common)
230 ("pkg-config" ,pkg-config)
231 ("shared-mime-info" ,shared-mime-info)
235 ("gdk-pixbuf" ,gdk-pixbuf)
237 (home-page "http://siyanpanayotov.com/project/viewnior/")
238 (synopsis "Simple, fast and elegant image viewer")
239 (description "Viewnior is an image viewer program. Created to be simple,
240 fast and elegant. Its minimalistic interface provides more screenspace for
241 your images. Among its features are:
243 @item Fullscreen & Slideshow
244 @item Rotate, flip, crop, save, delete images
245 @item Animation support
246 @item Browse only selected images
247 @item Navigation window
248 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
249 @item Simple interface
250 @item EXIF and IPTC metadata
251 @item Configurable mouse actions
253 (license license:gpl3+)))
255 (define-public catimg
262 (uri (string-append "https://github.com/posva/catimg/archive"
263 "/v" version ".tar.gz"))
264 (file-name (string-append name "-" version ".tar.gz"))
267 "1rwgbq2imd5l4nql5hrz7rr5f4gz8aad1amlf0j3cxir8slpbd1y"))))
268 (build-system cmake-build-system)
270 `(#:tests? #f ; no tests
272 (modify-phases %standard-phases
274 (lambda* (#:key inputs #:allow-other-keys)
275 (let* ((magic (assoc-ref %build-inputs "imagemagick"))
276 (convert (string-append magic "/bin/convert")))
277 (substitute* "catimg"
278 ;; By replacing "convert", we also replace the "convert"
279 ;; in the message 'The version of convert is too old, don't
280 ;; expect good results :('. This should not happen, but in
281 ;; practice this error message should not affect us.
282 (("convert") convert))
286 (let* ((out (assoc-ref %outputs "out"))
287 (man (string-append out "/share/man/man1")))
288 (zero? (system* "cmake"
289 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
290 (string-append "-DMAN_OUTPUT_PATH=" man)
292 (zero? (system* "make")))))
293 (add-before 'install 'install-script
294 (lambda* (#:key outputs #:allow-other-keys)
295 ;; The bash script lacks an file extension. We have to rename
296 ;; it so that the C program and the bash script can be happy
298 (let* ((out (assoc-ref outputs "out"))
299 (bin (string-append out "/bin")))
300 (install-file "catimg" bin)
301 (rename-file (string-append bin "/catimg")
302 (string-append bin "/catimg.sh"))
305 `(("imagemagick" ,imagemagick))) ; for the bash script version
306 (home-page "https://github.com/posva/catimg")
307 (synopsis "Render images in the terminal")
309 "Catimg is a little program that prints images in the terminal.
310 It supports JPEG, PNG and GIF formats.")
311 (license license:expat)))
313 (define-public luminance-hdr
315 (name "luminance-hdr")
320 "mirror://sourceforge/qtpfsgui/luminance/"
321 version "/luminance-hdr-" version ".tar.bz2"))
324 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
325 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
326 (build-system cmake-build-system)
328 `(("pkg-config" ,pkg-config)
329 ("qttools" ,qttools)))
332 ("qtdeclarative" ,qtdeclarative)
333 ("qtwebkit" ,qtwebkit)
345 ("libtiff" ,libtiff)))
348 (modify-phases %standard-phases
349 (add-after 'set-paths 'add-ilmbase-include-path
350 (lambda* (#:key inputs #:allow-other-keys)
351 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
352 ;; not use 'OpenEXR.pc'. Thus, we need to add
353 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
355 (string-append (assoc-ref inputs "ilmbase")
357 ":" (or (getenv "CPATH") "")))
359 (home-page "http://qtpfsgui.sourceforge.net")
360 (synopsis "High dynamic range (HDR) imaging application")
362 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
363 application that aims to provide a workflow for high dynamic range (HDR)
364 imaging. It supports several HDR and LDR image formats, and it can:
367 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
368 16bit, RAW) of the same scene taken at different exposure setting;
369 @item Save load HDR images;
370 @item Rotate, resize and crop HDR images;
371 @item Tone-map HDR images;
372 @item Copy EXIF data between sets of images.
374 (license license:gpl2+)))
376 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
377 ;; For optional PDF support, you can install the mupdf package.
378 (define-public mcomix
385 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
386 "/mcomix-" version ".tar.bz2"))
389 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
390 (build-system python-build-system)
393 ("python2-pillow" ,python2-pillow)
394 ("python2-pygtk" ,python2-pygtk)))
396 ;; Python 2.5 or newer (Python 3 and up is not supported)
399 (modify-phases %standard-phases
400 (add-after 'unpack 'configure
401 (lambda* (#:key inputs #:allow-other-keys)
402 (let ((p7zip (assoc-ref inputs "p7zip")))
403 ;; insert absolute path to 7z executable
404 (substitute* "mcomix/archive/sevenzip_external.py"
405 (("_7z_executable = -1")
406 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
408 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
409 (synopsis "Image viewer for comics")
410 (description "MComix is a customizable image viewer that specializes as
411 a comic and manga reader. It supports a variety of container formats
412 including CBZ, CB7, CBT, LHA.")
413 (license license:gpl2+)))