1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017, 2018 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, 2018 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
7 ;;; Copyright © 2017 ng0 <ng0@n0.is>
8 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
10 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages image-viewers)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system meson)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages algebra)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages ghostscript)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages graphics)
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages imagemagick)
52 #:use-module (gnu packages maths)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages perl-check)
55 #:use-module (gnu packages photo)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages qt)
60 #:use-module (gnu packages xorg)
61 #:use-module (gnu packages))
67 (home-page "https://feh.finalrewind.org/")
70 (uri (string-append home-page
71 name "-" version ".tar.bz2"))
74 "1vsnxf4as3vyzjfhd8frzb1a8i7wnq7ck5ljx7qxqrnfqvxl1s4z"))))
75 (build-system gnu-build-system)
77 '(#:phases (modify-phases %standard-phases (delete 'configure))
80 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
84 ("perl-test-command" ,perl-test-command)))
85 (inputs `(("imlib2" ,imlib2)
91 ("libxinerama" ,libxinerama)))
93 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
94 ;; with the same variable as the `curl` command line HTTP tool.
95 (package-native-search-paths curl))
96 (synopsis "Fast and light imlib2-based image viewer")
98 "feh is an X11 image viewer aimed mostly at console users.
99 Unlike most other viewers, it does not have a fancy GUI, but simply
100 displays images. It can also be used to set the desktop wallpaper.
101 It is controlled via commandline arguments and configurable key/mouse
104 ;; The license is really the Expat license, with additional wording in the
105 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
106 ;; software packages that this Software was used."
107 (license (license:x11-style
109 "See 'COPYING' in the distribution."))))
111 (define-public geeqie
117 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
118 "releases/download/v" version "/geeqie-"
122 "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w"))))
123 (build-system gnu-build-system)
125 `(;; Enable support for a "map" pane using GPS data.
126 #:configure-flags '("--enable-map")
129 (modify-phases %standard-phases
130 (add-before 'bootstrap 'pre-bootstrap
132 (define (write-dummy-changelog port)
133 (display "See Git history for a change log.\n" port))
134 ;; Create ChangeLog{,.html} to placate the makefile, which would
135 ;; otherwise require access to the Git repo.
136 (call-with-output-file "ChangeLog"
137 write-dummy-changelog)
138 (call-with-output-file "ChangeLog.html"
139 write-dummy-changelog)
140 (setenv "NOCONFIGURE" "true")
143 `(("clutter" ,clutter)
144 ("libchamplain" ,libchamplain)
150 `(("autoconf" ,autoconf)
151 ("automake" ,automake)
152 ("glib" ,glib "bin") ; glib-gettextize
153 ("intltool" ,intltool)
154 ("pkg-config" ,pkg-config)))
155 (home-page "http://www.geeqie.org/")
156 (synopsis "Lightweight GTK+ based image viewer")
158 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
159 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
160 interoperability; easy integration with other software; geeqie works on files
161 and directories, there is no need to import images; fast preview for many raw
162 image formats; tools for image comparison, sorting and managing photo
163 collection. Geeqie was initially based on GQview.")
164 (license license:gpl2+)))
166 (define-public gpicview
172 (uri (string-append "mirror://sourceforge/lxde/"
173 "GPicView%20%28image%20Viewer%29/0.2.x/"
174 name "-" version ".tar.xz"))
177 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
178 (build-system gnu-build-system)
179 (inputs `(("gtk+" ,gtk+-2)
180 ("libjpeg" ,libjpeg)))
181 (native-inputs `(("intltool" ,intltool)
182 ("pkg-config" ,pkg-config)))
183 (synopsis "Simple and fast image viewer for X")
184 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
185 It is the default image viewer on LXDE desktop environment.")
186 (home-page "http://lxde.sourceforge.net/gpicview/")
187 (license license:gpl2+)))
196 (url "https://github.com/muennich/sxiv.git")
197 (commit (string-append "v" version))))
198 (file-name (git-file-name name version))
201 "13s1lfar142hq1j7xld0ri616p4bqs57b17yr4d0b9a9w7liz4hp"))))
202 (build-system gnu-build-system)
204 `(#:tests? #f ; no check target
206 (list (string-append "PREFIX=" %output)
208 ;; Xft.h #includes <ft2build.h> (without ‘freetype2/’). The sxiv
209 ;; Makefile works around this by hard-coding /usr/include instead.
210 (string-append "CPPFLAGS=-I"
211 (assoc-ref %build-inputs "freetype")
212 "/include/freetype2")
215 (modify-phases %standard-phases
216 (delete 'configure)))) ; no configure script
218 `(("freetype" ,freetype)
224 (home-page "https://github.com/muennich/sxiv")
225 (synopsis "Simple X Image Viewer")
227 "sxiv is an alternative to feh and qiv. Its primary goal is to
228 provide the most basic features required for fast image viewing. It has
229 vi key bindings and works nicely with tiling window managers. Its code
230 base should be kept small and clean to make it easy for you to dig into
231 it and customize it for your needs.")
232 (license license:gpl2+)))
234 (define-public viewnior
242 (url "https://github.com/hellosiyan/Viewnior.git")
243 (commit (string-append name "-" version))))
244 (file-name (git-file-name name version))
247 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
248 (build-system meson-build-system)
251 (modify-phases %standard-phases
252 (add-after 'unpack 'patch-source
254 ;; Don't create 'icon-theme.cache'
255 (substitute* "meson.build"
256 (("meson.add_install_script*") ""))
258 #:tests? #f)) ; no tests
260 `(("gettext" ,gettext-minimal)
261 ("glib" ,glib "bin") ; glib-genmarshal
262 ("pkg-config" ,pkg-config)
263 ("shared-mime-info" ,shared-mime-info)))
266 ("gdk-pixbuf" ,gdk-pixbuf)
268 (home-page "http://siyanpanayotov.com/project/viewnior")
269 (synopsis "Simple, fast and elegant image viewer")
270 (description "Viewnior is an image viewer program. Created to be simple,
271 fast and elegant. Its minimalistic interface provides more screenspace for
272 your images. Among its features are:
274 @item Fullscreen & Slideshow
275 @item Rotate, flip, crop, save, delete images
276 @item Animation support
277 @item Browse only selected images
278 @item Navigation window
279 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
280 @item Simple interface
281 @item EXIF and IPTC metadata
282 @item Configurable mouse actions
284 (license license:gpl3+)))
286 (define-public catimg
294 (url "https://github.com/posva/catimg.git")
296 (file-name (git-file-name name version))
298 (base32 "0n74iczzgxrcq3zpa7ndycb9rinm829yvf81c747q4ngv5q6pzcm"))))
299 (build-system cmake-build-system)
301 `(#:tests? #f ; no tests
303 (modify-phases %standard-phases
304 (add-after 'unpack 'patch-convert
306 (substitute* "catimg"
307 ;; By replacing "convert", we also replace the "convert"
308 ;; in the message 'The version of convert is too old, don't
309 ;; expect good results :('. This should not happen, but in
310 ;; practice this error message should not affect us.
311 (("convert") (which "convert")))
313 (add-after 'install 'install-script
314 (lambda* (#:key outputs #:allow-other-keys)
315 ;; The bash script lacks an file extension. We have to rename
316 ;; it so that the C program and the bash script can be happy
318 (copy-file "../source/catimg"
319 (string-append (assoc-ref outputs "out")
323 `(("imagemagick" ,imagemagick))) ; for the bash script version
324 (home-page "https://github.com/posva/catimg")
325 (synopsis "Render images in the terminal")
327 "Catimg is a little program that prints images in the terminal.
328 It supports JPEG, PNG and GIF formats.")
329 (license license:expat)))
331 (define-public luminance-hdr
333 (name "luminance-hdr")
338 "mirror://sourceforge/qtpfsgui/luminance/"
339 version "/luminance-hdr-" version ".tar.bz2"))
342 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
343 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
344 (build-system cmake-build-system)
346 `(("pkg-config" ,pkg-config)
347 ("qttools" ,qttools)))
350 ("qtdeclarative" ,qtdeclarative)
351 ("qtwebkit" ,qtwebkit)
363 ("libtiff" ,libtiff)))
366 (modify-phases %standard-phases
367 (add-after 'set-paths 'add-ilmbase-include-path
368 (lambda* (#:key inputs #:allow-other-keys)
369 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
370 ;; not use 'OpenEXR.pc'. Thus, we need to add
371 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
373 (string-append (assoc-ref inputs "ilmbase")
375 ":" (or (getenv "CPATH") "")))
377 (home-page "http://qtpfsgui.sourceforge.net")
378 (synopsis "High dynamic range (HDR) imaging application")
380 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
381 application that aims to provide a workflow for high dynamic range (HDR)
382 imaging. It supports several HDR and LDR image formats, and it can:
385 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
386 16bit, RAW) of the same scene taken at different exposure setting;
387 @item Save load HDR images;
388 @item Rotate, resize and crop HDR images;
389 @item Tone-map HDR images;
390 @item Copy EXIF data between sets of images.
392 (license license:gpl2+)))
394 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
395 ;; For optional PDF support, you can install the mupdf package.
396 (define-public mcomix
403 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
404 "/mcomix-" version ".tar.bz2"))
407 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
408 (build-system python-build-system)
411 ("python2-pillow" ,python2-pillow)
412 ("python2-pygtk" ,python2-pygtk)))
414 ;; Python 2.5 or newer (Python 3 and up is not supported)
416 #:tests? #f ; there are no tests
418 (modify-phases %standard-phases
419 (add-after 'unpack 'configure
420 (lambda* (#:key inputs #:allow-other-keys)
421 (let ((p7zip (assoc-ref inputs "p7zip")))
422 ;; insert absolute path to 7z executable
423 (substitute* "mcomix/archive/sevenzip_external.py"
424 (("_7z_executable = -1")
425 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
427 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
428 (synopsis "Image viewer for comics")
429 (description "MComix is a customizable image viewer that specializes as
430 a comic and manga reader. It supports a variety of container formats
431 including CBZ, CB7, CBT, LHA.")
432 (license license:gpl2+)))
441 (url "https://github.com/jurplel/qView.git")
445 "1s29hz44rb5dwzq8d4i4bfg77dr0v3ywpvidpa6xzg7hnnv3mhi5"))))
446 (build-system gnu-build-system)
449 (modify-phases %standard-phases
453 ;; Installation process hard-codes "/usr/bin", possibly
455 (add-after 'configure 'fix-install-directory
456 (lambda* (#:key outputs #:allow-other-keys)
457 (let ((out (assoc-ref outputs "out")))
458 (substitute* "Makefile"
459 (("\\$\\(INSTALL_ROOT\\)/usr") out))
461 ;; Don't phone home or show "Checking for updates..." in the
463 (add-before 'build 'disable-auto-update
465 (substitute* "src/qvaboutdialog.cpp"
466 (("ui->updateLabel->setText\\(updateText\\);") "")
467 (("requestUpdates\\(\\);") ""))
472 ("qtimageformats" ,qtimageformats)))
473 (home-page "https://interversehq.com/qview/")
474 (synopsis "Convenient and minimal image viewer")
475 (description "qView is a Qt image viewer designed with visually
476 minimalism and usability in mind. Its features include animated GIF
477 controls, file history, rotation/mirroring, and multithreaded
479 (license license:gpl3+)))