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 Nils Gillmann <ng0@n0.is>
8 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
10 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages image-viewers)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix packages)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system meson)
36 #:use-module (guix build-system python)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages algebra)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages ghostscript)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages graphics)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages imagemagick)
51 #:use-module (gnu packages maths)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages perl-check)
54 #:use-module (gnu packages photo)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages qt)
58 #:use-module (gnu packages xorg)
59 #:use-module (gnu packages))
65 (home-page "https://feh.finalrewind.org/")
68 (uri (string-append home-page
69 name "-" version ".tar.bz2"))
72 "1sy8z6rv5sy1bhk3846hgfdy96wdi874yr2fnxfprks46qp29l31"))))
73 (build-system gnu-build-system)
75 '(#:phases (modify-phases %standard-phases (delete 'configure))
78 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
82 ("perl-test-command" ,perl-test-command)))
83 (inputs `(("imlib2" ,imlib2)
89 ("libxinerama" ,libxinerama)))
91 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
92 ;; with the same variable as the `curl` command line HTTP tool.
93 (package-native-search-paths curl))
94 (synopsis "Fast and light imlib2-based image viewer")
96 "feh is an X11 image viewer aimed mostly at console users.
97 Unlike most other viewers, it does not have a fancy GUI, but simply
98 displays images. It can also be used to set the desktop wallpaper.
99 It is controlled via commandline arguments and configurable key/mouse
102 ;; The license is really the Expat license, with additional wording in the
103 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
104 ;; software packages that this Software was used."
105 (license (license:x11-style
107 "See 'COPYING' in the distribution."))))
109 (define-public geeqie
115 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
116 "releases/download/v" version "/geeqie-"
120 "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w"))))
121 (build-system gnu-build-system)
123 `(;; Enable support for a "map" pane using GPS data.
124 #:configure-flags '("--enable-map")
127 (modify-phases %standard-phases
128 (add-after 'unpack 'autogen
130 (define (write-dummy-changelog port)
131 (display "See Git history for a change log.\n" port))
133 (setenv "NOCONFIGURE" "true")
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)
142 (zero? (system* "sh" "autogen.sh")))))))
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 "020n1bdxbzqncprh8a4rnjzc4frp335yxbqh5w6dr970f7n5qm8d"))))
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 "DEF_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")
296 (commit (string-append "v" version))))
297 (file-name (git-file-name name version))
300 "1sk74nfc1aklg784pzknr37dyz4k7h9fck3mifpn43rav5qy2zpy"))))
301 (build-system cmake-build-system)
303 `(#:tests? #f ; no tests
305 (modify-phases %standard-phases
307 (lambda* (#:key inputs #:allow-other-keys)
308 (let* ((magic (assoc-ref %build-inputs "imagemagick"))
309 (convert (string-append magic "/bin/convert")))
310 (substitute* "catimg"
311 ;; By replacing "convert", we also replace the "convert"
312 ;; in the message 'The version of convert is too old, don't
313 ;; expect good results :('. This should not happen, but in
314 ;; practice this error message should not affect us.
315 (("convert") convert))
319 (let* ((out (assoc-ref %outputs "out"))
320 (man (string-append out "/share/man/man1")))
321 (zero? (system* "cmake"
322 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
323 (string-append "-DMAN_OUTPUT_PATH=" man)
325 (zero? (system* "make")))))
326 (add-before 'install 'install-script
327 (lambda* (#:key outputs #:allow-other-keys)
328 ;; The bash script lacks an file extension. We have to rename
329 ;; it so that the C program and the bash script can be happy
331 (let* ((out (assoc-ref outputs "out"))
332 (bin (string-append out "/bin")))
333 (install-file "catimg" bin)
334 (rename-file (string-append bin "/catimg")
335 (string-append bin "/catimg.sh"))
338 `(("imagemagick" ,imagemagick))) ; for the bash script version
339 (home-page "https://github.com/posva/catimg")
340 (synopsis "Render images in the terminal")
342 "Catimg is a little program that prints images in the terminal.
343 It supports JPEG, PNG and GIF formats.")
344 (license license:expat)))
346 (define-public luminance-hdr
348 (name "luminance-hdr")
353 "mirror://sourceforge/qtpfsgui/luminance/"
354 version "/luminance-hdr-" version ".tar.bz2"))
357 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
358 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
359 (build-system cmake-build-system)
361 `(("pkg-config" ,pkg-config)
362 ("qttools" ,qttools)))
365 ("qtdeclarative" ,qtdeclarative)
366 ("qtwebkit" ,qtwebkit)
378 ("libtiff" ,libtiff)))
381 (modify-phases %standard-phases
382 (add-after 'set-paths 'add-ilmbase-include-path
383 (lambda* (#:key inputs #:allow-other-keys)
384 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
385 ;; not use 'OpenEXR.pc'. Thus, we need to add
386 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
388 (string-append (assoc-ref inputs "ilmbase")
390 ":" (or (getenv "CPATH") "")))
392 (home-page "http://qtpfsgui.sourceforge.net")
393 (synopsis "High dynamic range (HDR) imaging application")
395 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
396 application that aims to provide a workflow for high dynamic range (HDR)
397 imaging. It supports several HDR and LDR image formats, and it can:
400 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
401 16bit, RAW) of the same scene taken at different exposure setting;
402 @item Save load HDR images;
403 @item Rotate, resize and crop HDR images;
404 @item Tone-map HDR images;
405 @item Copy EXIF data between sets of images.
407 (license license:gpl2+)))
409 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
410 ;; For optional PDF support, you can install the mupdf package.
411 (define-public mcomix
418 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
419 "/mcomix-" version ".tar.bz2"))
422 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
423 (build-system python-build-system)
426 ("python2-pillow" ,python2-pillow)
427 ("python2-pygtk" ,python2-pygtk)))
429 ;; Python 2.5 or newer (Python 3 and up is not supported)
431 #:tests? #f ; there are no tests
433 (modify-phases %standard-phases
434 (add-after 'unpack 'configure
435 (lambda* (#:key inputs #:allow-other-keys)
436 (let ((p7zip (assoc-ref inputs "p7zip")))
437 ;; insert absolute path to 7z executable
438 (substitute* "mcomix/archive/sevenzip_external.py"
439 (("_7z_executable = -1")
440 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
442 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
443 (synopsis "Image viewer for comics")
444 (description "MComix is a customizable image viewer that specializes as
445 a comic and manga reader. It supports a variety of container formats
446 including CBZ, CB7, CBT, LHA.")
447 (license license:gpl2+)))