1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017, 2018, 2019 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, 2019 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>
13 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
14 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages image-viewers)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix packages)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system meson)
39 #:use-module (guix build-system python)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages algebra)
42 #:use-module (gnu packages boost)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages curl)
45 #:use-module (gnu packages fontutils)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages ghostscript)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnome)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages graphics)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages imagemagick)
54 #:use-module (gnu packages maths)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages perl-check)
57 #:use-module (gnu packages photo)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages xorg)
63 #:use-module (gnu packages))
69 (home-page "https://feh.finalrewind.org/")
72 (uri (string-append home-page
73 name "-" version ".tar.bz2"))
76 "04c8cgwzkax481sz7lbzy23mk79bqmjy3qpvr7vxa4c14mc9k5gk"))))
77 (build-system gnu-build-system)
79 '(#:phases (modify-phases %standard-phases (delete 'configure))
82 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
86 ("perl-test-command" ,perl-test-command)))
87 (inputs `(("imlib2" ,imlib2)
93 ("libxinerama" ,libxinerama)))
95 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
96 ;; with the same variable as the `curl` command line HTTP tool.
97 (package-native-search-paths curl))
98 (synopsis "Fast and light imlib2-based image viewer")
100 "feh is an X11 image viewer aimed mostly at console users.
101 Unlike most other viewers, it does not have a fancy GUI, but simply
102 displays images. It can also be used to set the desktop wallpaper.
103 It is controlled via commandline arguments and configurable key/mouse
106 ;; The license is really the Expat license, with additional wording in the
107 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
108 ;; software packages that this Software was used."
109 (license (license:x11-style
111 "See 'COPYING' in the distribution."))))
113 (define-public geeqie
114 ;; The latest release, 1.4, fails to build with Exiv2 0.27.1. The upstream
115 ;; repo has several fixes for that, so take a snapshot.
116 (let ((commit "c220ddefb1b6b11b54f7598f0d44dd0723325ed4")
120 (version (git-version "1.4" revision commit))
124 (url "https://github.com/BestImageViewer/geeqie")
128 "07424nzrnwbksgalgg1a6ig2snd986w79kca1cfnv1q9kc7x2h3x"))
129 (file-name (git-file-name name version))))
130 (build-system gnu-build-system)
132 `( ;; Enable support for a "map" pane using GPS data.
133 #:configure-flags '("--enable-map")
135 ;; Parallel builds fail with something like:
136 ;; image-load.c:143:9: error: ‘gq_marshal_VOID__INT_INT_INT_INT’ undeclared
137 ;; due to unexpressed makefile dependencies.
141 (modify-phases %standard-phases
142 (add-before 'bootstrap 'pre-bootstrap
144 (define (write-dummy-changelog port)
145 (display "See Git history for a change log.\n" port))
146 ;; Create ChangeLog{,.html} to placate the makefile, which would
147 ;; otherwise require access to the Git repo.
148 (call-with-output-file "ChangeLog"
149 write-dummy-changelog)
150 (call-with-output-file "ChangeLog.html"
151 write-dummy-changelog)
152 (setenv "NOCONFIGURE" "true")
154 ;; Don't try to run 'git' for the version number.
155 (substitute* "configure.ac"
156 (("m4_esyscmd_s\\([^)]+\\)")
157 (string-append "[" ,version "]")))
159 ;; Remove references to non-existent files.
160 (substitute* "po/POTFILES.in"
161 (("^plugins/import/.*") ""))
164 `(("clutter" ,clutter)
165 ("libchamplain" ,libchamplain)
171 `(("autoconf" ,autoconf)
172 ("automake" ,automake)
173 ("glib" ,glib "bin") ; glib-gettextize
174 ("intltool" ,intltool)
175 ("pkg-config" ,pkg-config)))
176 (home-page "http://www.geeqie.org/")
177 (synopsis "Lightweight GTK+ based image viewer")
179 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
180 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
181 interoperability; easy integration with other software; geeqie works on files
182 and directories, there is no need to import images; fast preview for many raw
183 image formats; tools for image comparison, sorting and managing photo
184 collection. Geeqie was initially based on GQview.")
185 (license license:gpl2+))))
187 (define-public gpicview
193 (uri (string-append "mirror://sourceforge/lxde/"
194 "GPicView%20%28image%20Viewer%29/0.2.x/"
195 name "-" version ".tar.xz"))
198 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
199 (build-system gnu-build-system)
200 (inputs `(("gtk+" ,gtk+-2)
201 ("libjpeg" ,libjpeg)))
202 (native-inputs `(("intltool" ,intltool)
203 ("pkg-config" ,pkg-config)))
204 (synopsis "Simple and fast image viewer for X")
205 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
206 It is the default image viewer on LXDE desktop environment.")
207 (home-page "http://lxde.sourceforge.net/gpicview/")
208 (license license:gpl2+)))
217 (url "https://github.com/muennich/sxiv.git")
218 (commit (string-append "v" version))))
219 (file-name (git-file-name name version))
222 "13s1lfar142hq1j7xld0ri616p4bqs57b17yr4d0b9a9w7liz4hp"))))
223 (build-system gnu-build-system)
225 `(#:tests? #f ; no check target
227 (list (string-append "PREFIX=" %output)
229 ;; Xft.h #includes <ft2build.h> (without ‘freetype2/’). The sxiv
230 ;; Makefile works around this by hard-coding /usr/include instead.
231 (string-append "CPPFLAGS=-I"
232 (assoc-ref %build-inputs "freetype")
233 "/include/freetype2")
236 (modify-phases %standard-phases
237 (delete 'configure)))) ; no configure script
239 `(("freetype" ,freetype)
245 (home-page "https://github.com/muennich/sxiv")
246 (synopsis "Simple X Image Viewer")
248 "sxiv is an alternative to feh and qiv. Its primary goal is to
249 provide the most basic features required for fast image viewing. It has
250 vi key bindings and works nicely with tiling window managers. Its code
251 base should be kept small and clean to make it easy for you to dig into
252 it and customize it for your needs.")
253 (license license:gpl2+)))
255 (define-public viewnior
263 (url "https://github.com/hellosiyan/Viewnior.git")
264 (commit (string-append name "-" version))))
265 (file-name (git-file-name name version))
268 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
269 (build-system meson-build-system)
272 (modify-phases %standard-phases
273 (add-after 'unpack 'patch-source
275 ;; Don't create 'icon-theme.cache'
276 (substitute* "meson.build"
277 (("meson.add_install_script*") ""))
279 #:tests? #f)) ; no tests
281 `(("gettext" ,gettext-minimal)
282 ("glib" ,glib "bin") ; glib-genmarshal
283 ("pkg-config" ,pkg-config)
284 ("shared-mime-info" ,shared-mime-info)))
287 ("gdk-pixbuf" ,gdk-pixbuf)
289 (home-page "http://siyanpanayotov.com/project/viewnior")
290 (synopsis "Simple, fast and elegant image viewer")
291 (description "Viewnior is an image viewer program. Created to be simple,
292 fast and elegant. Its minimalistic interface provides more screenspace for
293 your images. Among its features are:
295 @item Fullscreen & Slideshow
296 @item Rotate, flip, crop, save, delete images
297 @item Animation support
298 @item Browse only selected images
299 @item Navigation window
300 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
301 @item Simple interface
302 @item EXIF and IPTC metadata
303 @item Configurable mouse actions
305 (license license:gpl3+)))
307 (define-public catimg
315 (url "https://github.com/posva/catimg.git")
317 (file-name (git-file-name name version))
319 (base32 "0g9ywbgy162wiam9hc3yqpq5q4gyxa8fj4jskr3fdz8z8jjaabzz"))))
320 (build-system cmake-build-system)
322 `(#:tests? #f ; no tests
324 (modify-phases %standard-phases
325 (add-after 'unpack 'patch-convert
327 (substitute* "catimg"
328 ;; By replacing "convert", we also replace the "convert"
329 ;; in the message 'The version of convert is too old, don't
330 ;; expect good results :('. This should not happen, but in
331 ;; practice this error message should not affect us.
332 (("convert") (which "convert")))
334 (add-after 'install 'install-script
335 (lambda* (#:key outputs #:allow-other-keys)
336 ;; The bash script lacks an file extension. We have to rename
337 ;; it so that the C program and the bash script can be happy
339 (copy-file "../source/catimg"
340 (string-append (assoc-ref outputs "out")
344 `(("imagemagick" ,imagemagick))) ; for the bash script version
345 (home-page "https://github.com/posva/catimg")
346 (synopsis "Render images in the terminal")
348 "Catimg is a little program that prints images in the terminal.
349 It supports JPEG, PNG and GIF formats.")
350 (license license:expat)))
352 (define-public luminance-hdr
354 (name "luminance-hdr")
359 "mirror://sourceforge/qtpfsgui/luminance/"
360 version "/luminance-hdr-" version ".tar.bz2"))
363 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
364 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
365 (build-system cmake-build-system)
367 `(("pkg-config" ,pkg-config)
368 ("qttools" ,qttools)))
371 ("qtdeclarative" ,qtdeclarative)
372 ("qtwebkit" ,qtwebkit)
384 ("libtiff" ,libtiff)))
387 (modify-phases %standard-phases
388 (add-after 'set-paths 'add-ilmbase-include-path
389 (lambda* (#:key inputs #:allow-other-keys)
390 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
391 ;; not use 'OpenEXR.pc'. Thus, we need to add
392 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
394 (string-append (assoc-ref inputs "ilmbase")
396 ":" (or (getenv "CPATH") "")))
398 (home-page "http://qtpfsgui.sourceforge.net")
399 (synopsis "High dynamic range (HDR) imaging application")
401 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
402 application that aims to provide a workflow for high dynamic range (HDR)
403 imaging. It supports several HDR and LDR image formats, and it can:
406 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
407 16bit, RAW) of the same scene taken at different exposure setting;
408 @item Save load HDR images;
409 @item Rotate, resize and crop HDR images;
410 @item Tone-map HDR images;
411 @item Copy EXIF data between sets of images.
413 (license license:gpl2+)))
415 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
416 ;; For optional PDF support, you can install the mupdf package.
417 (define-public mcomix
424 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
425 "/mcomix-" version ".tar.bz2"))
428 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
429 (build-system python-build-system)
432 ("python2-pillow" ,python2-pillow)
433 ("python2-pygtk" ,python2-pygtk)))
435 ;; Python 2.5 or newer (Python 3 and up is not supported)
437 #:tests? #f ; there are no tests
439 (modify-phases %standard-phases
440 (add-after 'unpack 'configure
441 (lambda* (#:key inputs #:allow-other-keys)
442 (let ((p7zip (assoc-ref inputs "p7zip")))
443 ;; insert absolute path to 7z executable
444 (substitute* "mcomix/archive/sevenzip_external.py"
445 (("_7z_executable = -1")
446 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
448 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
449 (synopsis "Image viewer for comics")
450 (description "MComix is a customizable image viewer that specializes as
451 a comic and manga reader. It supports a variety of container formats
452 including CBZ, CB7, CBT, LHA.")
453 (license license:gpl2+)))
462 (url "https://github.com/jurplel/qView.git")
464 (file-name (git-file-name name version))
467 "1s29hz44rb5dwzq8d4i4bfg77dr0v3ywpvidpa6xzg7hnnv3mhi5"))))
468 (build-system gnu-build-system)
471 (modify-phases %standard-phases
475 ;; Installation process hard-codes "/usr/bin", possibly
477 (add-after 'configure 'fix-install-directory
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let ((out (assoc-ref outputs "out")))
480 (substitute* "Makefile"
481 (("\\$\\(INSTALL_ROOT\\)/usr") out))
483 ;; Don't phone home or show "Checking for updates..." in the
485 (add-before 'build 'disable-auto-update
487 (substitute* "src/qvaboutdialog.cpp"
488 (("ui->updateLabel->setText\\(updateText\\);") "")
489 (("requestUpdates\\(\\);") ""))
494 ("qtimageformats" ,qtimageformats)))
495 (home-page "https://interversehq.com/qview/")
496 (synopsis "Convenient and minimal image viewer")
497 (description "qView is a Qt image viewer designed with visually
498 minimalism and usability in mind. Its features include animated GIF
499 controls, file history, rotation/mirroring, and multithreaded
501 (license license:gpl3+)))
509 (uri (string-append "https://hpjansson.org/chafa/releases/chafa-"
513 "1hj4vdyczby8h52ff23qxl8ng18p5jy549idngpiddwszf5s4drz"))))
514 (build-system gnu-build-system)
516 `(("pkg-config" ,pkg-config)))
519 ("imagemagick" ,imagemagick)))
520 (synopsis "Convert images to ANSI/Unicode characters")
522 "Chafa is a command-line utility that converts all kinds of images,
523 including animated GIFs, into ANSI/Unicode character output that can be
524 displayed in a terminal.")
525 (home-page "https://hpjansson.org/chafa/")
526 (license license:lgpl3+)))