gnu: Rename qtbase to qtbase-5.
[jackhill/guix/guix.git] / gnu / packages / image-viewers.scm
CommitLineData
d1a5b200 1;;; GNU Guix --- Functional package management for GNU
51c87770 2;;; Copyright © 2013, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
d1a5b200
AK
3;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
08b12d0e 5;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
f7e9f1ca 6;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
3c986a7d 7;;; Copyright © 2017 Nikita <nikita@n0.is>
ed3a9ec5 8;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4ee81d37 9;;; Copyright © 2017 nee <nee-git@hidamari.blue>
65ba20e5 10;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
027f97b1 11;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
87036462 12;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
a0570377 13;;; Copyright © 2019, 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
9943d238 14;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
cd819b45 15;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
e2bd0af3 16;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
e5afc63b 17;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
08f35b9b 18;;; Copyright © 2021 Rovanion Luckey <rovanion.luckey@gmail.com>
7bcbf35e 19;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
2fa624dd 20;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
eb55f018 21;;;
d1a5b200
AK
22;;; This file is part of GNU Guix.
23;;;
eb55f018
EF
24;;; GNU Guix is free software; you can redistribute it and/or modify it
25;;; under the terms of the GNU General Public License as published by
26;;; the Free Software Foundation; either version 3 of the License, or (at
27;;; your option) any later version.
28;;;
29;;; GNU Guix is distributed in the hope that it will be useful, but
30;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32;;; GNU General Public License for more details.
33;;;
34;;; You should have received a copy of the GNU General Public License
35;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36
37(define-module (gnu packages image-viewers)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix download)
92f08e14 40 #:use-module (guix git-download)
eb55f018 41 #:use-module (guix packages)
e5afc63b 42 #:use-module (guix utils)
eb55f018 43 #:use-module (guix build-system gnu)
9016dbc2 44 #:use-module (guix build-system cmake)
307cdd66 45 #:use-module (guix build-system meson)
4ee81d37 46 #:use-module (guix build-system python)
eb55f018 47 #:use-module (gnu packages autotools)
e79bfa18 48 #:use-module (gnu packages algebra)
e79bfa18 49 #:use-module (gnu packages boost)
cd819b45 50 #:use-module (gnu packages check)
e79bfa18 51 #:use-module (gnu packages compression)
d1a5b200 52 #:use-module (gnu packages curl)
cd819b45 53 #:use-module (gnu packages documentation)
6c162d0e 54 #:use-module (gnu packages fontutils)
cd819b45 55 #:use-module (gnu packages freedesktop)
307cdd66 56 #:use-module (gnu packages gettext)
d1a5b200 57 #:use-module (gnu packages ghostscript)
cd819b45 58 #:use-module (gnu packages gl)
eb55f018
EF
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gtk)
e79bfa18 62 #:use-module (gnu packages graphics)
023f0fb0 63 #:use-module (gnu packages image)
08f35b9b 64 #:use-module (gnu packages image-processing)
9016dbc2 65 #:use-module (gnu packages imagemagick)
e79bfa18 66 #:use-module (gnu packages maths)
83a7a88f 67 #:use-module (gnu packages perl)
5ccde207 68 #:use-module (gnu packages perl-check)
d1a5b200
AK
69 #:use-module (gnu packages photo)
70 #:use-module (gnu packages pkg-config)
4ee81d37 71 #:use-module (gnu packages python)
44d10b1f 72 #:use-module (gnu packages python-xyz)
e79bfa18 73 #:use-module (gnu packages qt)
cd819b45 74 #:use-module (gnu packages xdisorg)
e79bfa18
LC
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages))
d1a5b200
AK
77
78(define-public feh
79 (package
80 (name "feh")
7bcbf35e 81 (version "3.6.3")
d1a5b200
AK
82 (home-page "https://feh.finalrewind.org/")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append home-page
86 name "-" version ".tar.bz2"))
87 (sha256
88 (base32
7bcbf35e 89 "1d13x8hmvpdc5f5rj4l29ha7iz7wvqxjlvh6il04wq8igzrj0x23"))))
d1a5b200
AK
90 (build-system gnu-build-system)
91 (arguments
9c44af6b 92 `(#:phases (modify-phases %standard-phases (delete 'configure))
83a7a88f 93 #:test-target "test"
dc1d3cde 94 #:make-flags
9c44af6b
MD
95 (list ,(string-append "CC=" (cc-for-target))
96 (string-append "PREFIX=" (assoc-ref %outputs "out"))
123612d3
TGR
97 "exif=1"
98 "inotify=1")))
83a7a88f
MB
99 (native-inputs
100 `(("perl" ,perl)
101 ("perl-test-command" ,perl-test-command)))
d1a5b200
AK
102 (inputs `(("imlib2" ,imlib2)
103 ("curl" ,curl)
0de33cb3 104 ("libexif" ,libexif)
d1a5b200
AK
105 ("libpng" ,libpng)
106 ("libxt" ,libxt)
107 ("libx11" ,libx11)
108 ("libxinerama" ,libxinerama)))
3c41b992
MB
109 (native-search-paths
110 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
111 ;; with the same variable as the `curl` command line HTTP tool.
dc138d6d 112 (package-native-search-paths curl))
d1a5b200
AK
113 (synopsis "Fast and light imlib2-based image viewer")
114 (description
115 "feh is an X11 image viewer aimed mostly at console users.
116Unlike most other viewers, it does not have a fancy GUI, but simply
117displays images. It can also be used to set the desktop wallpaper.
118It is controlled via commandline arguments and configurable key/mouse
119actions.")
120
121 ;; The license is really the Expat license, with additional wording in the
122 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
123 ;; software packages that this Software was used."
124 (license (license:x11-style
125 "file://COPYING"
126 "See 'COPYING' in the distribution."))))
127
128(define-public geeqie
e3e757ed
LC
129 (package
130 (name "geeqie")
131 (version "1.5")
132 (source (origin
133 (method git-fetch)
134 (uri (git-reference
135 (url "https://github.com/BestImageViewer/geeqie")
136 (commit (string-append "v" version))))
137 (sha256
138 (base32
139 "0nf45sh3pwsv98sppcrqj81b6mdi31n1sbc7gn88m8mhpfp1qq6k"))
140 (file-name (git-file-name name version))))
141 (build-system gnu-build-system)
142 (arguments
143 `( ;; Enable support for a "map" pane using GPS data.
144 #:configure-flags '("--enable-map"
145 "--enable-gtk3")))
146 (inputs
147 `(("clutter" ,clutter)
148 ("libchamplain" ,libchamplain)
149 ("lcms" ,lcms)
150 ("exiv2" ,exiv2)
151 ("libpng" ,libpng)
152 ("gtk+" ,gtk+)))
153 (native-inputs
154 `(("autoconf" ,autoconf)
155 ("automake" ,automake)
156 ("glib" ,glib "bin") ; glib-gettextize
157 ("intltool" ,intltool)
158 ("pkg-config" ,pkg-config)))
159 (home-page "http://www.geeqie.org/")
160 (synopsis "Lightweight GTK+ based image viewer")
161 (description
162 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
d1a5b200
AK
163systems. It features: EXIF, IPTC and XMP metadata browsing and editing
164interoperability; easy integration with other software; geeqie works on files
165and directories, there is no need to import images; fast preview for many raw
166image formats; tools for image comparison, sorting and managing photo
167collection. Geeqie was initially based on GQview.")
e3e757ed 168 (license license:gpl2+)))
d1a5b200 169
ed3a9ec5
MO
170(define-public gpicview
171 (package
172 (name "gpicview")
173 (version "0.2.5")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "mirror://sourceforge/lxde/"
177 "GPicView%20%28image%20Viewer%29/0.2.x/"
178 name "-" version ".tar.xz"))
179 (sha256
180 (base32
181 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
182 (build-system gnu-build-system)
183 (inputs `(("gtk+" ,gtk+-2)
4bd428a7 184 ("libjpeg" ,libjpeg-turbo)))
ed3a9ec5
MO
185 (native-inputs `(("intltool" ,intltool)
186 ("pkg-config" ,pkg-config)))
187 (synopsis "Simple and fast image viewer for X")
188 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
189It is the default image viewer on LXDE desktop environment.")
190 (home-page "http://lxde.sourceforge.net/gpicview/")
191 (license license:gpl2+)))
192
d1a5b200
AK
193(define-public sxiv
194 (package
195 (name "sxiv")
6420cab3 196 (version "26")
d1a5b200 197 (source (origin
92f08e14
RW
198 (method git-fetch)
199 (uri (git-reference
b0e7b699 200 (url "https://github.com/muennich/sxiv")
92f08e14
RW
201 (commit (string-append "v" version))))
202 (file-name (git-file-name name version))
d1a5b200
AK
203 (sha256
204 (base32
6420cab3 205 "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f"))))
d1a5b200
AK
206 (build-system gnu-build-system)
207 (arguments
6c162d0e
TGR
208 `(#:tests? #f ; no check target
209 #:make-flags
210 (list (string-append "PREFIX=" %output)
f165f7c9 211 (string-append "CC=" ,(cc-for-target))
6420cab3
TGR
212 ;; Xft.h #includes <ft2build.h> without ‘freetype2/’. The Makefile
213 ;; works around this by hard-coding /usr/include & $PREFIX.
56d2007e 214 (string-append "CPPFLAGS=-I"
6c162d0e
TGR
215 (assoc-ref %build-inputs "freetype")
216 "/include/freetype2")
217 "V=1")
218 #:phases
219 (modify-phases %standard-phases
d67a3beb
EF
220 (delete 'configure) ; no configure script
221 (add-after 'install 'install-desktop-file
222 (lambda* (#:key outputs #:allow-other-keys)
223 (install-file "sxiv.desktop"
224 (string-append (assoc-ref outputs "out")
225 "/share/applications"))
858bb37a
EF
226 #t))
227 (add-after 'install 'install-icons
228 (lambda* (#:key make-flags #:allow-other-keys)
229 (apply invoke "make" "-C" "icon" "install" make-flags))))))
d1a5b200 230 (inputs
6c162d0e 231 `(("freetype" ,freetype)
d1a5b200 232 ("giflib" ,giflib)
6c162d0e
TGR
233 ("imlib2" ,imlib2)
234 ("libexif" ,libexif)
235 ("libx11" ,libx11)
236 ("libxft" ,libxft)))
d1a5b200
AK
237 (home-page "https://github.com/muennich/sxiv")
238 (synopsis "Simple X Image Viewer")
239 (description
240 "sxiv is an alternative to feh and qiv. Its primary goal is to
241provide the most basic features required for fast image viewing. It has
242vi key bindings and works nicely with tiling window managers. Its code
243base should be kept small and clean to make it easy for you to dig into
244it and customize it for your needs.")
245 (license license:gpl2+)))
eb55f018
EF
246
247(define-public viewnior
248 (package
249 (name "viewnior")
307cdd66 250 (version "1.7")
eb55f018
EF
251 (source
252 (origin
83541fb6
EF
253 (method git-fetch)
254 (uri (git-reference
b0e7b699 255 (url "https://github.com/hellosiyan/Viewnior")
83541fb6
EF
256 (commit (string-append name "-" version))))
257 (file-name (git-file-name name version))
eb55f018
EF
258 (sha256
259 (base32
83541fb6 260 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
307cdd66 261 (build-system meson-build-system)
eb55f018
EF
262 (arguments
263 '(#:phases
264 (modify-phases %standard-phases
307cdd66 265 (add-after 'unpack 'patch-source
ea77385c
EF
266 (lambda _
267 ;; Don't create 'icon-theme.cache'
307cdd66
EF
268 (substitute* "meson.build"
269 (("meson.add_install_script*") ""))
270 #t)))
271 #:tests? #f)) ; no tests
eb55f018 272 (native-inputs
307cdd66 273 `(("gettext" ,gettext-minimal)
eb55f018 274 ("glib" ,glib "bin") ; glib-genmarshal
eb55f018 275 ("pkg-config" ,pkg-config)
307cdd66 276 ("shared-mime-info" ,shared-mime-info)))
eb55f018
EF
277 (inputs
278 `(("exiv2" ,exiv2)
279 ("gdk-pixbuf" ,gdk-pixbuf)
280 ("gtk+-2" ,gtk+-2)))
307cdd66 281 (home-page "http://siyanpanayotov.com/project/viewnior")
eb55f018
EF
282 (synopsis "Simple, fast and elegant image viewer")
283 (description "Viewnior is an image viewer program. Created to be simple,
284fast and elegant. Its minimalistic interface provides more screenspace for
285your images. Among its features are:
286@enumerate
287@item Fullscreen & Slideshow
288@item Rotate, flip, crop, save, delete images
289@item Animation support
290@item Browse only selected images
291@item Navigation window
292@item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
293@item Simple interface
294@item EXIF and IPTC metadata
295@item Configurable mouse actions
296@end enumerate\n")
297 (license license:gpl3+)))
9016dbc2 298
299(define-public catimg
300 (package
301 (name "catimg")
e330a31f 302 (version "2.7.0")
9016dbc2 303 (source
304 (origin
6f6f9267
RW
305 (method git-fetch)
306 (uri (git-reference
b0e7b699 307 (url "https://github.com/posva/catimg")
cdee738e 308 (commit version)))
6f6f9267 309 (file-name (git-file-name name version))
9016dbc2 310 (sha256
e330a31f 311 (base32 "0a2dswbv4xddb2l2d55hc43lzvjwrjs5z9am7v6i0p0mi2fmc89s"))))
9016dbc2 312 (build-system cmake-build-system)
313 (arguments
1e5c056c 314 `(#:tests? #f ; no tests
9016dbc2 315 #:phases
316 (modify-phases %standard-phases
e2f47efe 317 (add-after 'unpack 'patch-convert
9016dbc2 318 (lambda _
e2f47efe
RW
319 (substitute* "catimg"
320 ;; By replacing "convert", we also replace the "convert"
321 ;; in the message 'The version of convert is too old, don't
322 ;; expect good results :('. This should not happen, but in
323 ;; practice this error message should not affect us.
324 (("convert") (which "convert")))
325 #t))
326 (add-after 'install 'install-script
9016dbc2 327 (lambda* (#:key outputs #:allow-other-keys)
1e5c056c 328 ;; The bash script lacks an file extension. We have to rename
9016dbc2 329 ;; it so that the C program and the bash script can be happy
330 ;; side by side.
e2f47efe
RW
331 (copy-file "../source/catimg"
332 (string-append (assoc-ref outputs "out")
333 "/bin/catimg.sh"))
334 #t)))))
9016dbc2 335 (inputs
1e5c056c 336 `(("imagemagick" ,imagemagick))) ; for the bash script version
9016dbc2 337 (home-page "https://github.com/posva/catimg")
338 (synopsis "Render images in the terminal")
339 (description
340 "Catimg is a little program that prints images in the terminal.
341It supports JPEG, PNG and GIF formats.")
342 (license license:expat)))
e79bfa18
LC
343
344(define-public luminance-hdr
345 (package
346 (name "luminance-hdr")
beb7a281 347 (version "2.6.0")
e79bfa18
LC
348 (source (origin
349 (method url-fetch)
350 (uri (string-append
351 "mirror://sourceforge/qtpfsgui/luminance/"
352 version "/luminance-hdr-" version ".tar.bz2"))
353 (sha256
354 (base32
beb7a281 355 "188q0l63nfasqfvwbq4mwx2vh7wsfi2bq9n5nksddspl1qz01lnp"))))
e79bfa18
LC
356 (build-system cmake-build-system)
357 (native-inputs
358 `(("pkg-config" ,pkg-config)
359 ("qttools" ,qttools)))
360 (inputs
ea0a5107 361 `(("qtbase" ,qtbase-5)
e79bfa18 362 ("qtdeclarative" ,qtdeclarative)
beb7a281 363 ("qtsvg" ,qtsvg)
e79bfa18
LC
364 ("qtwebkit" ,qtwebkit)
365 ("boost" ,boost)
beb7a281 366 ("eigen" ,eigen)
e79bfa18
LC
367 ;; ("gtest" ,gtest)
368 ("libraw" ,libraw)
369 ("zlib" ,zlib)
370 ("exiv2" ,exiv2)
371 ("libpng" ,libpng)
4bd428a7 372 ("libjpeg" ,libjpeg-turbo)
e79bfa18
LC
373 ("lcms" ,lcms)
374 ("openexr" ,openexr)
375 ("fftw" ,fftwf)
376 ("gsl" ,gsl)
377 ("libtiff" ,libtiff)))
378 (arguments
beb7a281
MB
379 '(#:tests? #f ;XXX: some tests fail to compile
380 #:phases
e79bfa18
LC
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.
387 (setenv "CPATH"
388 (string-append (assoc-ref inputs "ilmbase")
389 "/include/OpenEXR"
390 ":" (or (getenv "CPATH") "")))
391 #t)))))
392 (home-page "http://qtpfsgui.sourceforge.net")
393 (synopsis "High dynamic range (HDR) imaging application")
394 (description
395 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
396application that aims to provide a workflow for high dynamic range (HDR)
397imaging. It supports several HDR and LDR image formats, and it can:
398
399@itemize
400@item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
40116bit, 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.
406@end itemize\n")
407 (license license:gpl2+)))
4ee81d37 408
409;; CBR and RAR are currently unsupported, due to non-free dependencies.
4ee81d37 410(define-public mcomix
e5afc63b
PN
411 ;; Official mcomix hasn't been updated since 2016, it's broken with
412 ;; python-pillow 6+ and only supports Python 2. We use fork instead.
413 (let ((commit "fea55a7a9369569eefed72209eed830409c4af98"))
414 (package
415 (name "mcomix")
416 (version (git-version "1.2.1" "1" commit))
417 (source
418 (origin
419 (method git-fetch)
420 (uri (git-reference
421 (url "https://github.com/multiSnow/mcomix3")
422 (commit commit)))
423 (file-name (git-file-name name version))
424 (sha256
425 (base32
426 "05zl0dkjwbdcm2zlk4nz9w33amlqj8pbf32a8ymshc2356fqhhi5"))))
427 (build-system python-build-system)
428 (inputs
429 `(("p7zip" ,p7zip)
430 ("python-pillow" ,python-pillow)
431 ("python-pygobject" ,python-pygobject)
432 ("python-pycairo" ,python-pycairo)))
433 (arguments
434 `(#:tests? #f ; FIXME: How do we run tests?
435 #:phases
436 (modify-phases %standard-phases
437 (add-after 'unpack 'configure
438 (lambda* (#:key inputs #:allow-other-keys)
439 (let ((p7zip (assoc-ref inputs "p7zip")))
440 ;; insert absolute path to 7z executable
441 (substitute* "mcomix/mcomix/archive/sevenzip_external.py"
442 (("_7z_executable = -1")
443 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
444 #t))
445 (replace 'build
446 (lambda* (#:key outputs #:allow-other-keys)
447 (let* ((out (assoc-ref outputs "out"))
448 (pyver ,(version-major+minor (package-version python)))
449 (lib (string-append out "/lib/python" pyver)))
450 (invoke (which "python") "installer.py" "--srcdir=mcomix"
451 (string-append "--target=" lib))
452 (rename-file (string-append lib "/mcomix")
453 (string-append lib "/site-packages"))
454 #t)))
455 (replace 'install
456 (lambda* (#:key outputs #:allow-other-keys)
457 (let* ((out (assoc-ref outputs "out"))
458 (share (string-append out "/share"))
459 (bin (string-append out "/bin"))
460 (pyver ,(version-major+minor (package-version python)))
461 (lib (string-append out "/lib/python" pyver "/site-packages")))
462 (mkdir-p bin)
463 (rename-file (string-append lib "/mcomixstarter.py")
464 (string-append bin "/mcomix"))
465 (rename-file (string-append lib "/comicthumb.py")
466 (string-append bin "/comicthumb"))
467 (install-file "mime/mcomix.desktop"
468 (string-append share "/applications"))
469 (install-file "mime/mcomix.appdata.xml"
470 (string-append share "/metainfo"))
471 (install-file "mime/mcomix.xml"
472 (string-append share "/mime/packages"))
473 (install-file "mime/comicthumb.thumbnailer"
474 (string-append share "/thumbnailers"))
475 (install-file "man/mcomix.1" (string-append share "/man/man1"))
476 (install-file "man/comicthumb.1" (string-append share "/man/man1"))
477 (for-each
478 (lambda (size)
479 (install-file
480 (format #f "mcomix/mcomix/images/~sx~s/mcomix.png" size size)
481 (format #f "~a/icons/hicolor/~sx~s/apps/" share size size))
482 (for-each
483 (lambda (ext)
484 (install-file
485 (format #f "mime/icons/~sx~s/application-x-~a.png" size size ext)
486 (format #f "~a/icons/hicolor/~sx~s/mimetypes/"
487 share size size)))
488 '("cb7" "cbr" "cbt" "cbz")))
489 '(16 22 24 32 48))
490 #t))))))
491 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
492 (synopsis "Image viewer for comics")
493 (description "MComix is a customizable image viewer that specializes as
4ee81d37 494a comic and manga reader. It supports a variety of container formats
e5afc63b
PN
495including CBZ, CB7, CBT, LHA.
496
497For PDF support, install the @emph{mupdf} package.")
498 (license license:gpl2+))))
87036462
NG
499
500(define-public qview
501 (package
502 (name "qview")
21df7028 503 (version "4.0")
4f620bbf
NG
504 (source
505 (origin
506 (method git-fetch)
507 (uri (git-reference
b0e7b699 508 (url "https://github.com/jurplel/qView")
4f620bbf
NG
509 (commit version)))
510 (file-name (git-file-name name version))
511 (sha256
21df7028 512 (base32 "15n9cq7w3ckinnx38hvncxrbkv4qm4k51sal41q4y0pkvhmafhnr"))))
87036462
NG
513 (build-system gnu-build-system)
514 (arguments
515 `(#:phases
516 (modify-phases %standard-phases
517 (replace 'configure
87036462
NG
518 (lambda* (#:key outputs #:allow-other-keys)
519 (let ((out (assoc-ref outputs "out")))
21df7028
NG
520 (invoke "qmake" (string-append "PREFIX=" out)))))
521 ;; Don't phone home or show "Checking for updates..." in the About
522 ;; menu.
87036462
NG
523 (add-before 'build 'disable-auto-update
524 (lambda _
525 (substitute* "src/qvaboutdialog.cpp"
7a9e68cc
NG
526 (("qvApp->checkUpdates\\(\\);") "")
527 (("updateText\\(\\);") ""))
87036462
NG
528 #t)))))
529 (inputs
ea0a5107 530 `(("qtbase" ,qtbase-5)
87036462
NG
531 ("qtsvg" ,qtsvg)
532 ("qtimageformats" ,qtimageformats)))
533 (home-page "https://interversehq.com/qview/")
534 (synopsis "Convenient and minimal image viewer")
535 (description "qView is a Qt image viewer designed with visually
536minimalism and usability in mind. Its features include animated GIF
537controls, file history, rotation/mirroring, and multithreaded
538preloading.")
539 (license license:gpl3+)))
52bb05c7 540
541(define-public chafa
542 (package
543 (name "chafa")
a0570377 544 (version "1.4.1")
52bb05c7 545 (source (origin
546 (method url-fetch)
547 (uri (string-append "https://hpjansson.org/chafa/releases/chafa-"
548 version ".tar.xz"))
549 (sha256
550 (base32
a0570377 551 "18rb82bfqj1sj2g4irazx4lwq9q4b4k7my1r0q714vf9yhs41ls6"))))
52bb05c7 552 (build-system gnu-build-system)
553 (native-inputs
554 `(("pkg-config" ,pkg-config)))
555 (inputs
a0570377 556 `(("freetype" ,freetype)
557 ("libjpeg" ,libjpeg-turbo)
558 ("glib" ,glib)
52bb05c7 559 ("imagemagick" ,imagemagick)))
560 (synopsis "Convert images to ANSI/Unicode characters")
561 (description
562 "Chafa is a command-line utility that converts all kinds of images,
563including animated GIFs, into ANSI/Unicode character output that can be
564displayed in a terminal.")
565 (home-page "https://hpjansson.org/chafa/")
566 (license license:lgpl3+)))
cd819b45
PMY
567
568(define-public imv
569 (package
570 (name "imv")
571 (version "4.1.0")
572 (source (origin
573 (method git-fetch)
574 (uri (git-reference
575 (url "https://github.com/eXeC64/imv")
576 (commit (string-append "v" version))))
577 (sha256
578 (base32
579 "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx"))
580 (file-name (git-file-name name version))))
581 (build-system gnu-build-system)
582 (arguments
9c44af6b 583 `(#:phases
cd819b45 584 (modify-phases %standard-phases
51c87770
LC
585 (delete 'configure)
586 (add-after 'install 'record-absolute-file-names
587 (lambda* (#:key outputs #:allow-other-keys)
588 ;; 'imv' is a script that execs 'imv-x11' or 'imv-wayland'.
589 ;; Record their absolute file name.
590 (let* ((out (assoc-ref outputs "out"))
591 (bin (string-append out "/bin")))
592 (substitute* (string-append bin "/imv")
593 (("imv-")
594 (string-append bin "/imv-")))
595 #t))))
cd819b45 596 #:make-flags
9c44af6b 597 (list ,(string-append "CC=" (cc-for-target))
cd819b45
PMY
598 (string-append "PREFIX=" (assoc-ref %outputs "out"))
599 (string-append "CONFIGPREFIX="
600 (assoc-ref %outputs "out") "/etc"))))
601 (inputs
602 `(("asciidoc" ,asciidoc)
603 ("freeimage" ,freeimage)
604 ("glu" ,glu)
605 ("librsvg" ,librsvg)
606 ("libxkbcommon" ,libxkbcommon)
607 ("pango" ,pango)
608 ("wayland" ,wayland)))
609 (native-inputs
610 `(("cmocka" ,cmocka)
611 ("pkg-config" ,pkg-config)))
612 (synopsis "Image viewer for tiling window managers")
613 (description "@code{imv} is a command line image viewer intended for use
614with tiling window managers. Features include:
615
616@itemize
617@item Native Wayland and X11 support.
618@item Support for dozens of image formats including:
619@itemize
620@item PNG
621@item JPEG
622@item Animated GIFs
623@item SVG
624@item TIFF
625@item Various RAW formats
626@item Photoshop PSD files
627@end itemize
628@item Configurable key bindings and behavior.
629@item Highly scriptable with IPC via imv-msg.
630@end itemize\n")
631 (home-page "https://github.com/eXeC64/imv")
632 (license license:expat)))
e2bd0af3
VK
633
634(define-public qiv
635 (package
636 (name "qiv")
637 (version "2.3.1")
638 (source
639 (origin
640 (method url-fetch)
641 (uri (string-append "http://spiegl.de/qiv/download/qiv-"
642 version ".tgz"))
643 (sha256
644 (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7"))))
645 (build-system gnu-build-system)
646 (native-inputs
647 `(("pkg-config" ,pkg-config)
648 ;; That is required for testing.
649 ("xorg-server" ,xorg-server-for-tests)))
650 (inputs
651 `(("imlib2" ,imlib2)
652 ("glib" ,glib)
653 ("gtk+" ,gtk+-2)
654 ("lcms" ,lcms)
27783023 655 ("libjpeg" ,libjpeg-turbo)
e2bd0af3
VK
656 ("libtiff" ,libtiff)
657 ("libexif" ,libexif)
658 ("libx11" ,libx11)
659 ("libxext" ,libxext)))
660 (arguments
661 `(#:phases
662 (modify-phases %standard-phases
663 (delete 'configure) ; no configure script
664 (add-before 'install 'patch-file-start-xserver
665 (lambda* (#:key inputs #:allow-other-keys)
666 ;; patch the file so that qiv runs and exits by itself
667 (substitute* "Makefile"
668 (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg")
669 ;; Fail the build when test fails.
670 (("echo \"-- Test Failed --\"")
671 "(echo \"-- Test Failed --\" ; false)"))
672 ;; There must be a running X server and make install doesn't start one.
673 ;; Therefore we must do it.
674 (system "Xvfb :1 &")
675 (setenv "DISPLAY" ":1")
676 #t)))
677 #:tests? #f ; there is no check target
678 #:make-flags
679 (list
680 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
681 (home-page "http://spiegl.de/qiv/")
682 (synopsis "Graphical image viewer for X")
683 (description
684 "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer.
685Features include zoom, maxpect, scale down, fullscreen, slideshow, delete,
686brightness/contrast/gamma correction, pan with keyboard and mouse, flip,
687rotate left/right, jump/forward/backward images, filename filter and use it
688to set X desktop background.")
689 (license license:gpl2)))
08f35b9b
RL
690
691(define-public nomacs
692 (package
693 (name "nomacs")
694 (version "3.16.224")
695 (source
696 (origin
697 (method git-fetch)
698 (uri (git-reference
699 (url "https://github.com/nomacs/nomacs")
700 (commit version)))
08b12d0e 701 (file-name (git-file-name name version))
08f35b9b
RL
702 (sha256
703 (base32
704 "05d4hqg0gl3g9s2xf1hr7mc7g4cqarcap4nzxxa51fsphw2b8x16"))))
705 (build-system cmake-build-system)
706 (arguments
707 `(#:build-type "Release" ; fails to build with debug info
708 #:configure-flags (list "-DENABLE_TRANSLATIONS=true"
709 "-DUSE_SYSTEM_QUAZIP=true"
710 "-DENABLE_OPENCV=true")
711 #:tests? #f ; no rule for target 'test'
712 #:phases
713 (modify-phases %standard-phases
714 (add-after 'unpack 'copy-plugins
715 (lambda* (#:key inputs #:allow-other-keys)
716 (copy-recursively (assoc-ref inputs "plugins")
717 "ImageLounge/plugins")))
718 (add-after 'copy-plugins 'cd-to-source-dir
719 (lambda _ (chdir "ImageLounge") #t)))))
720 (inputs
721 `(("plugins"
722 ,(origin
723 (method git-fetch)
724 (uri (git-reference
725 (url "https://github.com/nomacs/nomacs-plugins")
726 (commit "3.16")))
727 (sha256
728 (base32
729 "1cpdwhfvaxm970nwdc1hc13848a85pqqi176m9xpa3krla9qskml"))))
730 ("exiv2" ,exiv2)
731 ("libraw" ,libraw)
732 ("libtiff" ,libtiff)
733 ("opencv" ,opencv)
734 ("python" ,python-wrapper)
735 ("quazip" ,quazip)
ea0a5107 736 ("qtbase" ,qtbase-5)
08b12d0e 737 ("qtsvg" ,qtsvg)))
08f35b9b 738 (native-inputs
08b12d0e
EF
739 `(("pkg-config" ,pkg-config)
740 ("qtlinguist" ,qttools)))
08f35b9b
RL
741 (synopsis "Image viewer supporting all common formats")
742 (description "Nomacs is a simple to use image lounge featuring
743semi-transparent widgets that display additional information such as metadata,
744thumbnails and histograms. It is able to browse images compressed archives
745and add notes to images.
746
747Nomacs includes image manipulation methods for adjusting brightness, contrast,
748saturation, hue, gamma, and exposure. It has a pseudo color function which
749allows creating false color images. A unique feature of Nomacs is the
750synchronization of multiple instances.")
751 (home-page "https://nomacs.org/")
752 (license license:gpl3+)))
2fa624dd
SR
753
754(define-public xzgv
755 (package
756 (name "xzgv")
757 (version "0.9.2")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (string-append "mirror://sourceforge/xzgv/"
762 version "/xzgv-" version ".tar.gz"))
763 (sha256
764 (base32 "17l1xr9v07ggwga3vn0z1i4lnwjrr20rr8z1kjbw71aaijxl18i5"))))
765 (build-system gnu-build-system)
766 (arguments
767 `(#:phases
768 (modify-phases %standard-phases
769 (add-after 'unpack 'override-target-directory
770 (lambda* (#:key outputs #:allow-other-keys)
771 (substitute* "config.mk"
772 (("/usr/local") (assoc-ref outputs "out")))))
773 (delete 'configure) ; no configure script
774 (replace 'install
775 (lambda* (#:key outputs #:allow-other-keys)
776 (let* ((out (assoc-ref outputs "out"))
777 (bin (string-append out "/bin")))
778 (install-file "src/xzgv" bin))))) ; just install the executable
779 #:tests? #f)) ; no rule for target 'test'
780 (native-inputs
781 `(("pkg-config" ,pkg-config)))
782 (inputs
783 `(("gtk+" ,gtk+-2)
784 ("libexif" ,libexif)))
785 (home-page "https://sourceforge.net/projects/xzgv/")
786 (synopsis "Picture viewer for X with a thumbnail-based selector")
787 (description
788 "xzgv is a fast image viewer that provides extensive keyboard support.")
789 (license license:gpl2+)))