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