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>
13 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages image-viewers)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix packages)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system meson)
38 #:use-module (guix build-system python)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages ghostscript)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages graphics)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages imagemagick)
53 #:use-module (gnu packages maths)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages perl-check)
56 #:use-module (gnu packages photo)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages qt)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages))
68 (home-page "https://feh.finalrewind.org/")
71 (uri (string-append home-page
72 name "-" version ".tar.bz2"))
75 "1vsnxf4as3vyzjfhd8frzb1a8i7wnq7ck5ljx7qxqrnfqvxl1s4z"))))
76 (build-system gnu-build-system)
78 '(#:phases (modify-phases %standard-phases (delete 'configure))
81 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
85 ("perl-test-command" ,perl-test-command)))
86 (inputs `(("imlib2" ,imlib2)
92 ("libxinerama" ,libxinerama)))
94 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
95 ;; with the same variable as the `curl` command line HTTP tool.
96 (package-native-search-paths curl))
97 (synopsis "Fast and light imlib2-based image viewer")
99 "feh is an X11 image viewer aimed mostly at console users.
100 Unlike most other viewers, it does not have a fancy GUI, but simply
101 displays images. It can also be used to set the desktop wallpaper.
102 It is controlled via commandline arguments and configurable key/mouse
105 ;; The license is really the Expat license, with additional wording in the
106 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
107 ;; software packages that this Software was used."
108 (license (license:x11-style
110 "See 'COPYING' in the distribution."))))
112 (define-public geeqie
118 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
119 "releases/download/v" version "/geeqie-"
123 "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w"))))
124 (build-system gnu-build-system)
126 `(;; Enable support for a "map" pane using GPS data.
127 #:configure-flags '("--enable-map")
130 (modify-phases %standard-phases
131 (add-before 'bootstrap 'pre-bootstrap
133 (define (write-dummy-changelog port)
134 (display "See Git history for a change log.\n" port))
135 ;; Create ChangeLog{,.html} to placate the makefile, which would
136 ;; otherwise require access to the Git repo.
137 (call-with-output-file "ChangeLog"
138 write-dummy-changelog)
139 (call-with-output-file "ChangeLog.html"
140 write-dummy-changelog)
141 (setenv "NOCONFIGURE" "true")
144 `(("clutter" ,clutter)
145 ("libchamplain" ,libchamplain)
151 `(("autoconf" ,autoconf)
152 ("automake" ,automake)
153 ("glib" ,glib "bin") ; glib-gettextize
154 ("intltool" ,intltool)
155 ("pkg-config" ,pkg-config)))
156 (home-page "http://www.geeqie.org/")
157 (synopsis "Lightweight GTK+ based image viewer")
159 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
160 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
161 interoperability; easy integration with other software; geeqie works on files
162 and directories, there is no need to import images; fast preview for many raw
163 image formats; tools for image comparison, sorting and managing photo
164 collection. Geeqie was initially based on GQview.")
165 (license license:gpl2+)))
167 (define-public gpicview
173 (uri (string-append "mirror://sourceforge/lxde/"
174 "GPicView%20%28image%20Viewer%29/0.2.x/"
175 name "-" version ".tar.xz"))
178 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
179 (build-system gnu-build-system)
180 (inputs `(("gtk+" ,gtk+-2)
181 ("libjpeg" ,libjpeg)))
182 (native-inputs `(("intltool" ,intltool)
183 ("pkg-config" ,pkg-config)))
184 (synopsis "Simple and fast image viewer for X")
185 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
186 It is the default image viewer on LXDE desktop environment.")
187 (home-page "http://lxde.sourceforge.net/gpicview/")
188 (license license:gpl2+)))
197 (url "https://github.com/muennich/sxiv.git")
198 (commit (string-append "v" version))))
199 (file-name (git-file-name name version))
202 "13s1lfar142hq1j7xld0ri616p4bqs57b17yr4d0b9a9w7liz4hp"))))
203 (build-system gnu-build-system)
205 `(#:tests? #f ; no check target
207 (list (string-append "PREFIX=" %output)
209 ;; Xft.h #includes <ft2build.h> (without ‘freetype2/’). The sxiv
210 ;; Makefile works around this by hard-coding /usr/include instead.
211 (string-append "CPPFLAGS=-I"
212 (assoc-ref %build-inputs "freetype")
213 "/include/freetype2")
216 (modify-phases %standard-phases
217 (delete 'configure)))) ; no configure script
219 `(("freetype" ,freetype)
225 (home-page "https://github.com/muennich/sxiv")
226 (synopsis "Simple X Image Viewer")
228 "sxiv is an alternative to feh and qiv. Its primary goal is to
229 provide the most basic features required for fast image viewing. It has
230 vi key bindings and works nicely with tiling window managers. Its code
231 base should be kept small and clean to make it easy for you to dig into
232 it and customize it for your needs.")
233 (license license:gpl2+)))
235 (define-public viewnior
243 (url "https://github.com/hellosiyan/Viewnior.git")
244 (commit (string-append name "-" version))))
245 (file-name (git-file-name name version))
248 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
249 (build-system meson-build-system)
252 (modify-phases %standard-phases
253 (add-after 'unpack 'patch-source
255 ;; Don't create 'icon-theme.cache'
256 (substitute* "meson.build"
257 (("meson.add_install_script*") ""))
259 #:tests? #f)) ; no tests
261 `(("gettext" ,gettext-minimal)
262 ("glib" ,glib "bin") ; glib-genmarshal
263 ("pkg-config" ,pkg-config)
264 ("shared-mime-info" ,shared-mime-info)))
267 ("gdk-pixbuf" ,gdk-pixbuf)
269 (home-page "http://siyanpanayotov.com/project/viewnior")
270 (synopsis "Simple, fast and elegant image viewer")
271 (description "Viewnior is an image viewer program. Created to be simple,
272 fast and elegant. Its minimalistic interface provides more screenspace for
273 your images. Among its features are:
275 @item Fullscreen & Slideshow
276 @item Rotate, flip, crop, save, delete images
277 @item Animation support
278 @item Browse only selected images
279 @item Navigation window
280 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
281 @item Simple interface
282 @item EXIF and IPTC metadata
283 @item Configurable mouse actions
285 (license license:gpl3+)))
287 (define-public catimg
295 (url "https://github.com/posva/catimg.git")
297 (file-name (git-file-name name version))
299 (base32 "0n74iczzgxrcq3zpa7ndycb9rinm829yvf81c747q4ngv5q6pzcm"))))
300 (build-system cmake-build-system)
302 `(#:tests? #f ; no tests
304 (modify-phases %standard-phases
305 (add-after 'unpack 'patch-convert
307 (substitute* "catimg"
308 ;; By replacing "convert", we also replace the "convert"
309 ;; in the message 'The version of convert is too old, don't
310 ;; expect good results :('. This should not happen, but in
311 ;; practice this error message should not affect us.
312 (("convert") (which "convert")))
314 (add-after 'install 'install-script
315 (lambda* (#:key outputs #:allow-other-keys)
316 ;; The bash script lacks an file extension. We have to rename
317 ;; it so that the C program and the bash script can be happy
319 (copy-file "../source/catimg"
320 (string-append (assoc-ref outputs "out")
324 `(("imagemagick" ,imagemagick))) ; for the bash script version
325 (home-page "https://github.com/posva/catimg")
326 (synopsis "Render images in the terminal")
328 "Catimg is a little program that prints images in the terminal.
329 It supports JPEG, PNG and GIF formats.")
330 (license license:expat)))
332 (define-public luminance-hdr
334 (name "luminance-hdr")
339 "mirror://sourceforge/qtpfsgui/luminance/"
340 version "/luminance-hdr-" version ".tar.bz2"))
343 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
344 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
345 (build-system cmake-build-system)
347 `(("pkg-config" ,pkg-config)
348 ("qttools" ,qttools)))
351 ("qtdeclarative" ,qtdeclarative)
352 ("qtwebkit" ,qtwebkit)
364 ("libtiff" ,libtiff)))
367 (modify-phases %standard-phases
368 (add-after 'set-paths 'add-ilmbase-include-path
369 (lambda* (#:key inputs #:allow-other-keys)
370 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
371 ;; not use 'OpenEXR.pc'. Thus, we need to add
372 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
374 (string-append (assoc-ref inputs "ilmbase")
376 ":" (or (getenv "CPATH") "")))
378 (home-page "http://qtpfsgui.sourceforge.net")
379 (synopsis "High dynamic range (HDR) imaging application")
381 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
382 application that aims to provide a workflow for high dynamic range (HDR)
383 imaging. It supports several HDR and LDR image formats, and it can:
386 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
387 16bit, RAW) of the same scene taken at different exposure setting;
388 @item Save load HDR images;
389 @item Rotate, resize and crop HDR images;
390 @item Tone-map HDR images;
391 @item Copy EXIF data between sets of images.
393 (license license:gpl2+)))
395 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
396 ;; For optional PDF support, you can install the mupdf package.
397 (define-public mcomix
404 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
405 "/mcomix-" version ".tar.bz2"))
408 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
409 (build-system python-build-system)
412 ("python2-pillow" ,python2-pillow)
413 ("python2-pygtk" ,python2-pygtk)))
415 ;; Python 2.5 or newer (Python 3 and up is not supported)
417 #:tests? #f ; there are no tests
419 (modify-phases %standard-phases
420 (add-after 'unpack 'configure
421 (lambda* (#:key inputs #:allow-other-keys)
422 (let ((p7zip (assoc-ref inputs "p7zip")))
423 ;; insert absolute path to 7z executable
424 (substitute* "mcomix/archive/sevenzip_external.py"
425 (("_7z_executable = -1")
426 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
428 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
429 (synopsis "Image viewer for comics")
430 (description "MComix is a customizable image viewer that specializes as
431 a comic and manga reader. It supports a variety of container formats
432 including CBZ, CB7, CBT, LHA.")
433 (license license:gpl2+)))
442 (url "https://github.com/jurplel/qView.git")
446 "1s29hz44rb5dwzq8d4i4bfg77dr0v3ywpvidpa6xzg7hnnv3mhi5"))))
447 (build-system gnu-build-system)
450 (modify-phases %standard-phases
454 ;; Installation process hard-codes "/usr/bin", possibly
456 (add-after 'configure 'fix-install-directory
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let ((out (assoc-ref outputs "out")))
459 (substitute* "Makefile"
460 (("\\$\\(INSTALL_ROOT\\)/usr") out))
462 ;; Don't phone home or show "Checking for updates..." in the
464 (add-before 'build 'disable-auto-update
466 (substitute* "src/qvaboutdialog.cpp"
467 (("ui->updateLabel->setText\\(updateText\\);") "")
468 (("requestUpdates\\(\\);") ""))
473 ("qtimageformats" ,qtimageformats)))
474 (home-page "https://interversehq.com/qview/")
475 (synopsis "Convenient and minimal image viewer")
476 (description "qView is a Qt image viewer designed with visually
477 minimalism and usability in mind. Its features include animated GIF
478 controls, file history, rotation/mirroring, and multithreaded
480 (license license:gpl3+)))
488 (uri (string-append "https://hpjansson.org/chafa/releases/chafa-"
492 "00cf2z52az0z6bzc3hfm4l8infipy5ck410wqmbaybd2csjr3m29"))))
493 (build-system gnu-build-system)
495 `(("pkg-config" ,pkg-config)))
498 ("imagemagick" ,imagemagick)))
499 (synopsis "Convert images to ANSI/Unicode characters")
501 "Chafa is a command-line utility that converts all kinds of images,
502 including animated GIFs, into ANSI/Unicode character output that can be
503 displayed in a terminal.")
504 (home-page "https://hpjansson.org/chafa/")
505 (license license:lgpl3+)))