gnu: Add meson 0.55.1.
[jackhill/guix/guix.git] / gnu / packages / image-viewers.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017, 2018, 2019, 2020 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 Nikita <nikita@n0.is>
8 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
10 ;;; Copyright © 2018, 2019, 2020 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, 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
14 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
15 ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
16 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
17 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
18 ;;;
19 ;;; This file is part of GNU Guix.
20 ;;;
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
25 ;;;
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
30 ;;;
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34 (define-module (gnu packages image-viewers)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix packages)
39 #:use-module (guix utils)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system meson)
43 #:use-module (guix build-system python)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages algebra)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages freedesktop)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages graphics)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages imagemagick)
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages perl-check)
65 #:use-module (gnu packages photo)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages qt)
70 #:use-module (gnu packages xdisorg)
71 #:use-module (gnu packages xorg)
72 #:use-module (gnu packages))
73
74 (define-public feh
75 (package
76 (name "feh")
77 (version "3.5")
78 (home-page "https://feh.finalrewind.org/")
79 (source (origin
80 (method url-fetch)
81 (uri (string-append home-page
82 name "-" version ".tar.bz2"))
83 (sha256
84 (base32
85 "07jklibpi4ig9pbdrwhllsfffxn2h8xf4ma36qii00w4hb69v3rq"))))
86 (build-system gnu-build-system)
87 (arguments
88 '(#:phases (modify-phases %standard-phases (delete 'configure))
89 #:test-target "test"
90 #:make-flags
91 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
92 "exif=1"
93 "inotify=1")))
94 (native-inputs
95 `(("perl" ,perl)
96 ("perl-test-command" ,perl-test-command)))
97 (inputs `(("imlib2" ,imlib2)
98 ("curl" ,curl)
99 ("libexif" ,libexif)
100 ("libpng" ,libpng)
101 ("libxt" ,libxt)
102 ("libx11" ,libx11)
103 ("libxinerama" ,libxinerama)))
104 (native-search-paths
105 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
106 ;; with the same variable as the `curl` command line HTTP tool.
107 (package-native-search-paths curl))
108 (synopsis "Fast and light imlib2-based image viewer")
109 (description
110 "feh is an X11 image viewer aimed mostly at console users.
111 Unlike most other viewers, it does not have a fancy GUI, but simply
112 displays images. It can also be used to set the desktop wallpaper.
113 It is controlled via commandline arguments and configurable key/mouse
114 actions.")
115
116 ;; The license is really the Expat license, with additional wording in the
117 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
118 ;; software packages that this Software was used."
119 (license (license:x11-style
120 "file://COPYING"
121 "See 'COPYING' in the distribution."))))
122
123 (define-public geeqie
124 (package
125 (name "geeqie")
126 (version "1.5")
127 (source (origin
128 (method git-fetch)
129 (uri (git-reference
130 (url "https://github.com/BestImageViewer/geeqie")
131 (commit (string-append "v" version))))
132 (sha256
133 (base32
134 "0nf45sh3pwsv98sppcrqj81b6mdi31n1sbc7gn88m8mhpfp1qq6k"))
135 (file-name (git-file-name name version))))
136 (build-system gnu-build-system)
137 (arguments
138 `( ;; Enable support for a "map" pane using GPS data.
139 #:configure-flags '("--enable-map"
140 "--enable-gtk3")))
141 (inputs
142 `(("clutter" ,clutter)
143 ("libchamplain" ,libchamplain)
144 ("lcms" ,lcms)
145 ("exiv2" ,exiv2)
146 ("libpng" ,libpng)
147 ("gtk+" ,gtk+)))
148 (native-inputs
149 `(("autoconf" ,autoconf)
150 ("automake" ,automake)
151 ("glib" ,glib "bin") ; glib-gettextize
152 ("intltool" ,intltool)
153 ("pkg-config" ,pkg-config)))
154 (home-page "http://www.geeqie.org/")
155 (synopsis "Lightweight GTK+ based image viewer")
156 (description
157 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
158 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
159 interoperability; easy integration with other software; geeqie works on files
160 and directories, there is no need to import images; fast preview for many raw
161 image formats; tools for image comparison, sorting and managing photo
162 collection. Geeqie was initially based on GQview.")
163 (license license:gpl2+)))
164
165 (define-public gpicview
166 (package
167 (name "gpicview")
168 (version "0.2.5")
169 (source (origin
170 (method url-fetch)
171 (uri (string-append "mirror://sourceforge/lxde/"
172 "GPicView%20%28image%20Viewer%29/0.2.x/"
173 name "-" version ".tar.xz"))
174 (sha256
175 (base32
176 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
177 (build-system gnu-build-system)
178 (inputs `(("gtk+" ,gtk+-2)
179 ("libjpeg" ,libjpeg-turbo)))
180 (native-inputs `(("intltool" ,intltool)
181 ("pkg-config" ,pkg-config)))
182 (synopsis "Simple and fast image viewer for X")
183 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
184 It is the default image viewer on LXDE desktop environment.")
185 (home-page "http://lxde.sourceforge.net/gpicview/")
186 (license license:gpl2+)))
187
188 (define-public sxiv
189 (package
190 (name "sxiv")
191 (version "26")
192 (source (origin
193 (method git-fetch)
194 (uri (git-reference
195 (url "https://github.com/muennich/sxiv")
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
198 (sha256
199 (base32
200 "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f"))))
201 (build-system gnu-build-system)
202 (arguments
203 `(#:tests? #f ; no check target
204 #:make-flags
205 (list (string-append "PREFIX=" %output)
206 "CC=gcc"
207 ;; Xft.h #includes <ft2build.h> without ‘freetype2/’. The Makefile
208 ;; works around this by hard-coding /usr/include & $PREFIX.
209 (string-append "CPPFLAGS=-I"
210 (assoc-ref %build-inputs "freetype")
211 "/include/freetype2")
212 "V=1")
213 #:phases
214 (modify-phases %standard-phases
215 (delete 'configure)))) ; no configure script
216 (inputs
217 `(("freetype" ,freetype)
218 ("giflib" ,giflib)
219 ("imlib2" ,imlib2)
220 ("libexif" ,libexif)
221 ("libx11" ,libx11)
222 ("libxft" ,libxft)))
223 (home-page "https://github.com/muennich/sxiv")
224 (synopsis "Simple X Image Viewer")
225 (description
226 "sxiv is an alternative to feh and qiv. Its primary goal is to
227 provide the most basic features required for fast image viewing. It has
228 vi key bindings and works nicely with tiling window managers. Its code
229 base should be kept small and clean to make it easy for you to dig into
230 it and customize it for your needs.")
231 (license license:gpl2+)))
232
233 (define-public viewnior
234 (package
235 (name "viewnior")
236 (version "1.7")
237 (source
238 (origin
239 (method git-fetch)
240 (uri (git-reference
241 (url "https://github.com/hellosiyan/Viewnior")
242 (commit (string-append name "-" version))))
243 (file-name (git-file-name name version))
244 (sha256
245 (base32
246 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
247 (build-system meson-build-system)
248 (arguments
249 '(#:phases
250 (modify-phases %standard-phases
251 (add-after 'unpack 'patch-source
252 (lambda _
253 ;; Don't create 'icon-theme.cache'
254 (substitute* "meson.build"
255 (("meson.add_install_script*") ""))
256 #t)))
257 #:tests? #f)) ; no tests
258 (native-inputs
259 `(("gettext" ,gettext-minimal)
260 ("glib" ,glib "bin") ; glib-genmarshal
261 ("pkg-config" ,pkg-config)
262 ("shared-mime-info" ,shared-mime-info)))
263 (inputs
264 `(("exiv2" ,exiv2)
265 ("gdk-pixbuf" ,gdk-pixbuf)
266 ("gtk+-2" ,gtk+-2)))
267 (home-page "http://siyanpanayotov.com/project/viewnior")
268 (synopsis "Simple, fast and elegant image viewer")
269 (description "Viewnior is an image viewer program. Created to be simple,
270 fast and elegant. Its minimalistic interface provides more screenspace for
271 your images. Among its features are:
272 @enumerate
273 @item Fullscreen & Slideshow
274 @item Rotate, flip, crop, save, delete images
275 @item Animation support
276 @item Browse only selected images
277 @item Navigation window
278 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
279 @item Simple interface
280 @item EXIF and IPTC metadata
281 @item Configurable mouse actions
282 @end enumerate\n")
283 (license license:gpl3+)))
284
285 (define-public catimg
286 (package
287 (name "catimg")
288 (version "2.6.0")
289 (source
290 (origin
291 (method git-fetch)
292 (uri (git-reference
293 (url "https://github.com/posva/catimg")
294 (commit version)))
295 (file-name (git-file-name name version))
296 (sha256
297 (base32 "0g9ywbgy162wiam9hc3yqpq5q4gyxa8fj4jskr3fdz8z8jjaabzz"))))
298 (build-system cmake-build-system)
299 (arguments
300 `(#:tests? #f ; no tests
301 #:phases
302 (modify-phases %standard-phases
303 (add-after 'unpack 'patch-convert
304 (lambda _
305 (substitute* "catimg"
306 ;; By replacing "convert", we also replace the "convert"
307 ;; in the message 'The version of convert is too old, don't
308 ;; expect good results :('. This should not happen, but in
309 ;; practice this error message should not affect us.
310 (("convert") (which "convert")))
311 #t))
312 (add-after 'install 'install-script
313 (lambda* (#:key outputs #:allow-other-keys)
314 ;; The bash script lacks an file extension. We have to rename
315 ;; it so that the C program and the bash script can be happy
316 ;; side by side.
317 (copy-file "../source/catimg"
318 (string-append (assoc-ref outputs "out")
319 "/bin/catimg.sh"))
320 #t)))))
321 (inputs
322 `(("imagemagick" ,imagemagick))) ; for the bash script version
323 (home-page "https://github.com/posva/catimg")
324 (synopsis "Render images in the terminal")
325 (description
326 "Catimg is a little program that prints images in the terminal.
327 It supports JPEG, PNG and GIF formats.")
328 (license license:expat)))
329
330 (define-public luminance-hdr
331 (package
332 (name "luminance-hdr")
333 (version "2.6.0")
334 (source (origin
335 (method url-fetch)
336 (uri (string-append
337 "mirror://sourceforge/qtpfsgui/luminance/"
338 version "/luminance-hdr-" version ".tar.bz2"))
339 (sha256
340 (base32
341 "188q0l63nfasqfvwbq4mwx2vh7wsfi2bq9n5nksddspl1qz01lnp"))))
342 (build-system cmake-build-system)
343 (native-inputs
344 `(("pkg-config" ,pkg-config)
345 ("qttools" ,qttools)))
346 (inputs
347 `(("qtbase" ,qtbase)
348 ("qtdeclarative" ,qtdeclarative)
349 ("qtsvg" ,qtsvg)
350 ("qtwebkit" ,qtwebkit)
351 ("boost" ,boost)
352 ("eigen" ,eigen)
353 ;; ("gtest" ,gtest)
354 ("libraw" ,libraw)
355 ("zlib" ,zlib)
356 ("exiv2" ,exiv2)
357 ("libpng" ,libpng)
358 ("libjpeg" ,libjpeg-turbo)
359 ("lcms" ,lcms)
360 ("openexr" ,openexr)
361 ("fftw" ,fftwf)
362 ("gsl" ,gsl)
363 ("libtiff" ,libtiff)))
364 (arguments
365 '(#:tests? #f ;XXX: some tests fail to compile
366 #:phases
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.
373 (setenv "CPATH"
374 (string-append (assoc-ref inputs "ilmbase")
375 "/include/OpenEXR"
376 ":" (or (getenv "CPATH") "")))
377 #t)))))
378 (home-page "http://qtpfsgui.sourceforge.net")
379 (synopsis "High dynamic range (HDR) imaging application")
380 (description
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:
384
385 @itemize
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.
392 @end itemize\n")
393 (license license:gpl2+)))
394
395 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
396 (define-public mcomix
397 ;; Official mcomix hasn't been updated since 2016, it's broken with
398 ;; python-pillow 6+ and only supports Python 2. We use fork instead.
399 (let ((commit "fea55a7a9369569eefed72209eed830409c4af98"))
400 (package
401 (name "mcomix")
402 (version (git-version "1.2.1" "1" commit))
403 (source
404 (origin
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/multiSnow/mcomix3")
408 (commit commit)))
409 (file-name (git-file-name name version))
410 (sha256
411 (base32
412 "05zl0dkjwbdcm2zlk4nz9w33amlqj8pbf32a8ymshc2356fqhhi5"))))
413 (build-system python-build-system)
414 (inputs
415 `(("p7zip" ,p7zip)
416 ("python-pillow" ,python-pillow)
417 ("python-pygobject" ,python-pygobject)
418 ("python-pycairo" ,python-pycairo)))
419 (arguments
420 `(#:tests? #f ; FIXME: How do we run tests?
421 #:phases
422 (modify-phases %standard-phases
423 (add-after 'unpack 'configure
424 (lambda* (#:key inputs #:allow-other-keys)
425 (let ((p7zip (assoc-ref inputs "p7zip")))
426 ;; insert absolute path to 7z executable
427 (substitute* "mcomix/mcomix/archive/sevenzip_external.py"
428 (("_7z_executable = -1")
429 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
430 #t))
431 (replace 'build
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let* ((out (assoc-ref outputs "out"))
434 (pyver ,(version-major+minor (package-version python)))
435 (lib (string-append out "/lib/python" pyver)))
436 (invoke (which "python") "installer.py" "--srcdir=mcomix"
437 (string-append "--target=" lib))
438 (rename-file (string-append lib "/mcomix")
439 (string-append lib "/site-packages"))
440 #t)))
441 (replace 'install
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let* ((out (assoc-ref outputs "out"))
444 (share (string-append out "/share"))
445 (bin (string-append out "/bin"))
446 (pyver ,(version-major+minor (package-version python)))
447 (lib (string-append out "/lib/python" pyver "/site-packages")))
448 (mkdir-p bin)
449 (rename-file (string-append lib "/mcomixstarter.py")
450 (string-append bin "/mcomix"))
451 (rename-file (string-append lib "/comicthumb.py")
452 (string-append bin "/comicthumb"))
453 (install-file "mime/mcomix.desktop"
454 (string-append share "/applications"))
455 (install-file "mime/mcomix.appdata.xml"
456 (string-append share "/metainfo"))
457 (install-file "mime/mcomix.xml"
458 (string-append share "/mime/packages"))
459 (install-file "mime/comicthumb.thumbnailer"
460 (string-append share "/thumbnailers"))
461 (install-file "man/mcomix.1" (string-append share "/man/man1"))
462 (install-file "man/comicthumb.1" (string-append share "/man/man1"))
463 (for-each
464 (lambda (size)
465 (install-file
466 (format #f "mcomix/mcomix/images/~sx~s/mcomix.png" size size)
467 (format #f "~a/icons/hicolor/~sx~s/apps/" share size size))
468 (for-each
469 (lambda (ext)
470 (install-file
471 (format #f "mime/icons/~sx~s/application-x-~a.png" size size ext)
472 (format #f "~a/icons/hicolor/~sx~s/mimetypes/"
473 share size size)))
474 '("cb7" "cbr" "cbt" "cbz")))
475 '(16 22 24 32 48))
476 #t))))))
477 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
478 (synopsis "Image viewer for comics")
479 (description "MComix is a customizable image viewer that specializes as
480 a comic and manga reader. It supports a variety of container formats
481 including CBZ, CB7, CBT, LHA.
482
483 For PDF support, install the @emph{mupdf} package.")
484 (license license:gpl2+))))
485
486 (define-public qview
487 (package
488 (name "qview")
489 (version "3.0")
490 (source
491 (origin
492 (method git-fetch)
493 (uri (git-reference
494 (url "https://github.com/jurplel/qView")
495 (commit version)))
496 (file-name (git-file-name name version))
497 (sha256
498 (base32 "15a91bs3wcqhgf76wzigbn10hayg628j84pq4j2vaxar94ak0vk7"))))
499 (build-system gnu-build-system)
500 (arguments
501 `(#:phases
502 (modify-phases %standard-phases
503 (replace 'configure
504 (lambda _
505 (invoke "qmake")))
506 ;; Installation process hard-codes "/usr/bin", possibly
507 ;; prefixed.
508 (add-after 'configure 'fix-install-directory
509 (lambda* (#:key outputs #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out")))
511 (substitute* "Makefile"
512 (("\\$\\(INSTALL_ROOT\\)/usr") out))
513 #t)))
514 ;; Don't phone home or show "Checking for updates..." in the
515 ;; About menu.
516 (add-before 'build 'disable-auto-update
517 (lambda _
518 (substitute* "src/qvaboutdialog.cpp"
519 (("ui->updateLabel->setText\\(updateText\\);") "")
520 (("requestUpdates\\(\\);") ""))
521 #t)))))
522 (inputs
523 `(("qtbase" ,qtbase)
524 ("qtsvg" ,qtsvg)
525 ("qtimageformats" ,qtimageformats)))
526 (home-page "https://interversehq.com/qview/")
527 (synopsis "Convenient and minimal image viewer")
528 (description "qView is a Qt image viewer designed with visually
529 minimalism and usability in mind. Its features include animated GIF
530 controls, file history, rotation/mirroring, and multithreaded
531 preloading.")
532 (license license:gpl3+)))
533
534 (define-public chafa
535 (package
536 (name "chafa")
537 (version "1.4.1")
538 (source (origin
539 (method url-fetch)
540 (uri (string-append "https://hpjansson.org/chafa/releases/chafa-"
541 version ".tar.xz"))
542 (sha256
543 (base32
544 "18rb82bfqj1sj2g4irazx4lwq9q4b4k7my1r0q714vf9yhs41ls6"))))
545 (build-system gnu-build-system)
546 (native-inputs
547 `(("pkg-config" ,pkg-config)))
548 (inputs
549 `(("freetype" ,freetype)
550 ("libjpeg" ,libjpeg-turbo)
551 ("glib" ,glib)
552 ("imagemagick" ,imagemagick)))
553 (synopsis "Convert images to ANSI/Unicode characters")
554 (description
555 "Chafa is a command-line utility that converts all kinds of images,
556 including animated GIFs, into ANSI/Unicode character output that can be
557 displayed in a terminal.")
558 (home-page "https://hpjansson.org/chafa/")
559 (license license:lgpl3+)))
560
561 (define-public imv
562 (package
563 (name "imv")
564 (version "4.1.0")
565 (source (origin
566 (method git-fetch)
567 (uri (git-reference
568 (url "https://github.com/eXeC64/imv")
569 (commit (string-append "v" version))))
570 (sha256
571 (base32
572 "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx"))
573 (file-name (git-file-name name version))))
574 (build-system gnu-build-system)
575 (arguments
576 '(#:phases
577 (modify-phases %standard-phases
578 (delete 'configure)
579 (add-after 'install 'record-absolute-file-names
580 (lambda* (#:key outputs #:allow-other-keys)
581 ;; 'imv' is a script that execs 'imv-x11' or 'imv-wayland'.
582 ;; Record their absolute file name.
583 (let* ((out (assoc-ref outputs "out"))
584 (bin (string-append out "/bin")))
585 (substitute* (string-append bin "/imv")
586 (("imv-")
587 (string-append bin "/imv-")))
588 #t))))
589 #:make-flags
590 (list "CC=gcc"
591 (string-append "PREFIX=" (assoc-ref %outputs "out"))
592 (string-append "CONFIGPREFIX="
593 (assoc-ref %outputs "out") "/etc"))))
594 (inputs
595 `(("asciidoc" ,asciidoc)
596 ("freeimage" ,freeimage)
597 ("glu" ,glu)
598 ("librsvg" ,librsvg)
599 ("libxkbcommon" ,libxkbcommon)
600 ("pango" ,pango)
601 ("wayland" ,wayland)))
602 (native-inputs
603 `(("cmocka" ,cmocka)
604 ("pkg-config" ,pkg-config)))
605 (synopsis "Image viewer for tiling window managers")
606 (description "@code{imv} is a command line image viewer intended for use
607 with tiling window managers. Features include:
608
609 @itemize
610 @item Native Wayland and X11 support.
611 @item Support for dozens of image formats including:
612 @itemize
613 @item PNG
614 @item JPEG
615 @item Animated GIFs
616 @item SVG
617 @item TIFF
618 @item Various RAW formats
619 @item Photoshop PSD files
620 @end itemize
621 @item Configurable key bindings and behavior.
622 @item Highly scriptable with IPC via imv-msg.
623 @end itemize\n")
624 (home-page "https://github.com/eXeC64/imv")
625 (license license:expat)))
626
627 (define-public qiv
628 (package
629 (name "qiv")
630 (version "2.3.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (string-append "http://spiegl.de/qiv/download/qiv-"
635 version ".tgz"))
636 (sha256
637 (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7"))))
638 (build-system gnu-build-system)
639 (native-inputs
640 `(("pkg-config" ,pkg-config)
641 ;; That is required for testing.
642 ("xorg-server" ,xorg-server-for-tests)))
643 (inputs
644 `(("imlib2" ,imlib2)
645 ("glib" ,glib)
646 ("gtk+" ,gtk+-2)
647 ("lcms" ,lcms)
648 ("libjpeg" ,libjpeg-turbo)
649 ("libtiff" ,libtiff)
650 ("libexif" ,libexif)
651 ("libx11" ,libx11)
652 ("libxext" ,libxext)))
653 (arguments
654 `(#:phases
655 (modify-phases %standard-phases
656 (delete 'configure) ; no configure script
657 (add-before 'install 'patch-file-start-xserver
658 (lambda* (#:key inputs #:allow-other-keys)
659 ;; patch the file so that qiv runs and exits by itself
660 (substitute* "Makefile"
661 (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg")
662 ;; Fail the build when test fails.
663 (("echo \"-- Test Failed --\"")
664 "(echo \"-- Test Failed --\" ; false)"))
665 ;; There must be a running X server and make install doesn't start one.
666 ;; Therefore we must do it.
667 (system "Xvfb :1 &")
668 (setenv "DISPLAY" ":1")
669 #t)))
670 #:tests? #f ; there is no check target
671 #:make-flags
672 (list
673 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
674 (home-page "http://spiegl.de/qiv/")
675 (synopsis "Graphical image viewer for X")
676 (description
677 "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer.
678 Features include zoom, maxpect, scale down, fullscreen, slideshow, delete,
679 brightness/contrast/gamma correction, pan with keyboard and mouse, flip,
680 rotate left/right, jump/forward/backward images, filename filter and use it
681 to set X desktop background.")
682 (license license:gpl2)))