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