gnu: r-quantreg: Update to 5.67.
[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>
d67a3beb 5;;; Copyright © 2016, 2017, 2018, 2019, 2020 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>
6420cab3 10;;; Copyright © 2018, 2019, 2020 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>
eb55f018 18;;;
d1a5b200
AK
19;;; This file is part of GNU Guix.
20;;;
eb55f018
EF
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)
92f08e14 37 #:use-module (guix git-download)
eb55f018 38 #:use-module (guix packages)
e5afc63b 39 #:use-module (guix utils)
eb55f018 40 #:use-module (guix build-system gnu)
9016dbc2 41 #:use-module (guix build-system cmake)
307cdd66 42 #:use-module (guix build-system meson)
4ee81d37 43 #:use-module (guix build-system python)
eb55f018 44 #:use-module (gnu packages autotools)
e79bfa18 45 #:use-module (gnu packages algebra)
e79bfa18 46 #:use-module (gnu packages boost)
cd819b45 47 #:use-module (gnu packages check)
e79bfa18 48 #:use-module (gnu packages compression)
d1a5b200 49 #:use-module (gnu packages curl)
cd819b45 50 #:use-module (gnu packages documentation)
6c162d0e 51 #:use-module (gnu packages fontutils)
cd819b45 52 #:use-module (gnu packages freedesktop)
307cdd66 53 #:use-module (gnu packages gettext)
d1a5b200 54 #:use-module (gnu packages ghostscript)
cd819b45 55 #:use-module (gnu packages gl)
eb55f018
EF
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gtk)
e79bfa18 59 #:use-module (gnu packages graphics)
023f0fb0 60 #:use-module (gnu packages image)
9016dbc2 61 #:use-module (gnu packages imagemagick)
e79bfa18 62 #:use-module (gnu packages maths)
83a7a88f 63 #:use-module (gnu packages perl)
5ccde207 64 #:use-module (gnu packages perl-check)
d1a5b200
AK
65 #:use-module (gnu packages photo)
66 #:use-module (gnu packages pkg-config)
4ee81d37 67 #:use-module (gnu packages python)
44d10b1f 68 #:use-module (gnu packages python-xyz)
e79bfa18 69 #:use-module (gnu packages qt)
cd819b45 70 #:use-module (gnu packages xdisorg)
e79bfa18
LC
71 #:use-module (gnu packages xorg)
72 #:use-module (gnu packages))
d1a5b200
AK
73
74(define-public feh
75 (package
76 (name "feh")
5044a6eb 77 (version "3.5")
d1a5b200
AK
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
5044a6eb 85 "07jklibpi4ig9pbdrwhllsfffxn2h8xf4ma36qii00w4hb69v3rq"))))
d1a5b200
AK
86 (build-system gnu-build-system)
87 (arguments
dc1d3cde 88 '(#:phases (modify-phases %standard-phases (delete 'configure))
83a7a88f 89 #:test-target "test"
dc1d3cde 90 #:make-flags
0de33cb3 91 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
123612d3
TGR
92 "exif=1"
93 "inotify=1")))
83a7a88f
MB
94 (native-inputs
95 `(("perl" ,perl)
96 ("perl-test-command" ,perl-test-command)))
d1a5b200
AK
97 (inputs `(("imlib2" ,imlib2)
98 ("curl" ,curl)
0de33cb3 99 ("libexif" ,libexif)
d1a5b200
AK
100 ("libpng" ,libpng)
101 ("libxt" ,libxt)
102 ("libx11" ,libx11)
103 ("libxinerama" ,libxinerama)))
3c41b992
MB
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.
dc138d6d 107 (package-native-search-paths curl))
d1a5b200
AK
108 (synopsis "Fast and light imlib2-based image viewer")
109 (description
110 "feh is an X11 image viewer aimed mostly at console users.
111Unlike most other viewers, it does not have a fancy GUI, but simply
112displays images. It can also be used to set the desktop wallpaper.
113It is controlled via commandline arguments and configurable key/mouse
114actions.")
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
e3e757ed
LC
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
d1a5b200
AK
158systems. It features: EXIF, IPTC and XMP metadata browsing and editing
159interoperability; easy integration with other software; geeqie works on files
160and directories, there is no need to import images; fast preview for many raw
161image formats; tools for image comparison, sorting and managing photo
162collection. Geeqie was initially based on GQview.")
e3e757ed 163 (license license:gpl2+)))
d1a5b200 164
ed3a9ec5
MO
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)
4bd428a7 179 ("libjpeg" ,libjpeg-turbo)))
ed3a9ec5
MO
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.
184It is the default image viewer on LXDE desktop environment.")
185 (home-page "http://lxde.sourceforge.net/gpicview/")
186 (license license:gpl2+)))
187
d1a5b200
AK
188(define-public sxiv
189 (package
190 (name "sxiv")
6420cab3 191 (version "26")
d1a5b200 192 (source (origin
92f08e14
RW
193 (method git-fetch)
194 (uri (git-reference
b0e7b699 195 (url "https://github.com/muennich/sxiv")
92f08e14
RW
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
d1a5b200
AK
198 (sha256
199 (base32
6420cab3 200 "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f"))))
d1a5b200
AK
201 (build-system gnu-build-system)
202 (arguments
6c162d0e
TGR
203 `(#:tests? #f ; no check target
204 #:make-flags
205 (list (string-append "PREFIX=" %output)
f165f7c9 206 (string-append "CC=" ,(cc-for-target))
6420cab3
TGR
207 ;; Xft.h #includes <ft2build.h> without ‘freetype2/’. The Makefile
208 ;; works around this by hard-coding /usr/include & $PREFIX.
56d2007e 209 (string-append "CPPFLAGS=-I"
6c162d0e
TGR
210 (assoc-ref %build-inputs "freetype")
211 "/include/freetype2")
212 "V=1")
213 #:phases
214 (modify-phases %standard-phases
d67a3beb
EF
215 (delete 'configure) ; no configure script
216 (add-after 'install 'install-desktop-file
217 (lambda* (#:key outputs #:allow-other-keys)
218 (install-file "sxiv.desktop"
219 (string-append (assoc-ref outputs "out")
220 "/share/applications"))
858bb37a
EF
221 #t))
222 (add-after 'install 'install-icons
223 (lambda* (#:key make-flags #:allow-other-keys)
224 (apply invoke "make" "-C" "icon" "install" make-flags))))))
d1a5b200 225 (inputs
6c162d0e 226 `(("freetype" ,freetype)
d1a5b200 227 ("giflib" ,giflib)
6c162d0e
TGR
228 ("imlib2" ,imlib2)
229 ("libexif" ,libexif)
230 ("libx11" ,libx11)
231 ("libxft" ,libxft)))
d1a5b200
AK
232 (home-page "https://github.com/muennich/sxiv")
233 (synopsis "Simple X Image Viewer")
234 (description
235 "sxiv is an alternative to feh and qiv. Its primary goal is to
236provide the most basic features required for fast image viewing. It has
237vi key bindings and works nicely with tiling window managers. Its code
238base should be kept small and clean to make it easy for you to dig into
239it and customize it for your needs.")
240 (license license:gpl2+)))
eb55f018
EF
241
242(define-public viewnior
243 (package
244 (name "viewnior")
307cdd66 245 (version "1.7")
eb55f018
EF
246 (source
247 (origin
83541fb6
EF
248 (method git-fetch)
249 (uri (git-reference
b0e7b699 250 (url "https://github.com/hellosiyan/Viewnior")
83541fb6
EF
251 (commit (string-append name "-" version))))
252 (file-name (git-file-name name version))
eb55f018
EF
253 (sha256
254 (base32
83541fb6 255 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
307cdd66 256 (build-system meson-build-system)
eb55f018
EF
257 (arguments
258 '(#:phases
259 (modify-phases %standard-phases
307cdd66 260 (add-after 'unpack 'patch-source
ea77385c
EF
261 (lambda _
262 ;; Don't create 'icon-theme.cache'
307cdd66
EF
263 (substitute* "meson.build"
264 (("meson.add_install_script*") ""))
265 #t)))
266 #:tests? #f)) ; no tests
eb55f018 267 (native-inputs
307cdd66 268 `(("gettext" ,gettext-minimal)
eb55f018 269 ("glib" ,glib "bin") ; glib-genmarshal
eb55f018 270 ("pkg-config" ,pkg-config)
307cdd66 271 ("shared-mime-info" ,shared-mime-info)))
eb55f018
EF
272 (inputs
273 `(("exiv2" ,exiv2)
274 ("gdk-pixbuf" ,gdk-pixbuf)
275 ("gtk+-2" ,gtk+-2)))
307cdd66 276 (home-page "http://siyanpanayotov.com/project/viewnior")
eb55f018
EF
277 (synopsis "Simple, fast and elegant image viewer")
278 (description "Viewnior is an image viewer program. Created to be simple,
279fast and elegant. Its minimalistic interface provides more screenspace for
280your images. Among its features are:
281@enumerate
282@item Fullscreen & Slideshow
283@item Rotate, flip, crop, save, delete images
284@item Animation support
285@item Browse only selected images
286@item Navigation window
287@item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
288@item Simple interface
289@item EXIF and IPTC metadata
290@item Configurable mouse actions
291@end enumerate\n")
292 (license license:gpl3+)))
9016dbc2 293
294(define-public catimg
295 (package
296 (name "catimg")
0e773da0 297 (version "2.6.0")
9016dbc2 298 (source
299 (origin
6f6f9267
RW
300 (method git-fetch)
301 (uri (git-reference
b0e7b699 302 (url "https://github.com/posva/catimg")
cdee738e 303 (commit version)))
6f6f9267 304 (file-name (git-file-name name version))
9016dbc2 305 (sha256
0e773da0 306 (base32 "0g9ywbgy162wiam9hc3yqpq5q4gyxa8fj4jskr3fdz8z8jjaabzz"))))
9016dbc2 307 (build-system cmake-build-system)
308 (arguments
1e5c056c 309 `(#:tests? #f ; no tests
9016dbc2 310 #:phases
311 (modify-phases %standard-phases
e2f47efe 312 (add-after 'unpack 'patch-convert
9016dbc2 313 (lambda _
e2f47efe
RW
314 (substitute* "catimg"
315 ;; By replacing "convert", we also replace the "convert"
316 ;; in the message 'The version of convert is too old, don't
317 ;; expect good results :('. This should not happen, but in
318 ;; practice this error message should not affect us.
319 (("convert") (which "convert")))
320 #t))
321 (add-after 'install 'install-script
9016dbc2 322 (lambda* (#:key outputs #:allow-other-keys)
1e5c056c 323 ;; The bash script lacks an file extension. We have to rename
9016dbc2 324 ;; it so that the C program and the bash script can be happy
325 ;; side by side.
e2f47efe
RW
326 (copy-file "../source/catimg"
327 (string-append (assoc-ref outputs "out")
328 "/bin/catimg.sh"))
329 #t)))))
9016dbc2 330 (inputs
1e5c056c 331 `(("imagemagick" ,imagemagick))) ; for the bash script version
9016dbc2 332 (home-page "https://github.com/posva/catimg")
333 (synopsis "Render images in the terminal")
334 (description
335 "Catimg is a little program that prints images in the terminal.
336It supports JPEG, PNG and GIF formats.")
337 (license license:expat)))
e79bfa18
LC
338
339(define-public luminance-hdr
340 (package
341 (name "luminance-hdr")
beb7a281 342 (version "2.6.0")
e79bfa18
LC
343 (source (origin
344 (method url-fetch)
345 (uri (string-append
346 "mirror://sourceforge/qtpfsgui/luminance/"
347 version "/luminance-hdr-" version ".tar.bz2"))
348 (sha256
349 (base32
beb7a281 350 "188q0l63nfasqfvwbq4mwx2vh7wsfi2bq9n5nksddspl1qz01lnp"))))
e79bfa18
LC
351 (build-system cmake-build-system)
352 (native-inputs
353 `(("pkg-config" ,pkg-config)
354 ("qttools" ,qttools)))
355 (inputs
356 `(("qtbase" ,qtbase)
357 ("qtdeclarative" ,qtdeclarative)
beb7a281 358 ("qtsvg" ,qtsvg)
e79bfa18
LC
359 ("qtwebkit" ,qtwebkit)
360 ("boost" ,boost)
beb7a281 361 ("eigen" ,eigen)
e79bfa18
LC
362 ;; ("gtest" ,gtest)
363 ("libraw" ,libraw)
364 ("zlib" ,zlib)
365 ("exiv2" ,exiv2)
366 ("libpng" ,libpng)
4bd428a7 367 ("libjpeg" ,libjpeg-turbo)
e79bfa18
LC
368 ("lcms" ,lcms)
369 ("openexr" ,openexr)
370 ("fftw" ,fftwf)
371 ("gsl" ,gsl)
372 ("libtiff" ,libtiff)))
373 (arguments
beb7a281
MB
374 '(#:tests? #f ;XXX: some tests fail to compile
375 #:phases
e79bfa18
LC
376 (modify-phases %standard-phases
377 (add-after 'set-paths 'add-ilmbase-include-path
378 (lambda* (#:key inputs #:allow-other-keys)
379 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
380 ;; not use 'OpenEXR.pc'. Thus, we need to add
381 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
382 (setenv "CPATH"
383 (string-append (assoc-ref inputs "ilmbase")
384 "/include/OpenEXR"
385 ":" (or (getenv "CPATH") "")))
386 #t)))))
387 (home-page "http://qtpfsgui.sourceforge.net")
388 (synopsis "High dynamic range (HDR) imaging application")
389 (description
390 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
391application that aims to provide a workflow for high dynamic range (HDR)
392imaging. It supports several HDR and LDR image formats, and it can:
393
394@itemize
395@item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
39616bit, RAW) of the same scene taken at different exposure setting;
397@item Save load HDR images;
398@item Rotate, resize and crop HDR images;
399@item Tone-map HDR images;
400@item Copy EXIF data between sets of images.
401@end itemize\n")
402 (license license:gpl2+)))
4ee81d37 403
404;; CBR and RAR are currently unsupported, due to non-free dependencies.
4ee81d37 405(define-public mcomix
e5afc63b
PN
406 ;; Official mcomix hasn't been updated since 2016, it's broken with
407 ;; python-pillow 6+ and only supports Python 2. We use fork instead.
408 (let ((commit "fea55a7a9369569eefed72209eed830409c4af98"))
409 (package
410 (name "mcomix")
411 (version (git-version "1.2.1" "1" commit))
412 (source
413 (origin
414 (method git-fetch)
415 (uri (git-reference
416 (url "https://github.com/multiSnow/mcomix3")
417 (commit commit)))
418 (file-name (git-file-name name version))
419 (sha256
420 (base32
421 "05zl0dkjwbdcm2zlk4nz9w33amlqj8pbf32a8ymshc2356fqhhi5"))))
422 (build-system python-build-system)
423 (inputs
424 `(("p7zip" ,p7zip)
425 ("python-pillow" ,python-pillow)
426 ("python-pygobject" ,python-pygobject)
427 ("python-pycairo" ,python-pycairo)))
428 (arguments
429 `(#:tests? #f ; FIXME: How do we run tests?
430 #:phases
431 (modify-phases %standard-phases
432 (add-after 'unpack 'configure
433 (lambda* (#:key inputs #:allow-other-keys)
434 (let ((p7zip (assoc-ref inputs "p7zip")))
435 ;; insert absolute path to 7z executable
436 (substitute* "mcomix/mcomix/archive/sevenzip_external.py"
437 (("_7z_executable = -1")
438 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
439 #t))
440 (replace 'build
441 (lambda* (#:key outputs #:allow-other-keys)
442 (let* ((out (assoc-ref outputs "out"))
443 (pyver ,(version-major+minor (package-version python)))
444 (lib (string-append out "/lib/python" pyver)))
445 (invoke (which "python") "installer.py" "--srcdir=mcomix"
446 (string-append "--target=" lib))
447 (rename-file (string-append lib "/mcomix")
448 (string-append lib "/site-packages"))
449 #t)))
450 (replace 'install
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (share (string-append out "/share"))
454 (bin (string-append out "/bin"))
455 (pyver ,(version-major+minor (package-version python)))
456 (lib (string-append out "/lib/python" pyver "/site-packages")))
457 (mkdir-p bin)
458 (rename-file (string-append lib "/mcomixstarter.py")
459 (string-append bin "/mcomix"))
460 (rename-file (string-append lib "/comicthumb.py")
461 (string-append bin "/comicthumb"))
462 (install-file "mime/mcomix.desktop"
463 (string-append share "/applications"))
464 (install-file "mime/mcomix.appdata.xml"
465 (string-append share "/metainfo"))
466 (install-file "mime/mcomix.xml"
467 (string-append share "/mime/packages"))
468 (install-file "mime/comicthumb.thumbnailer"
469 (string-append share "/thumbnailers"))
470 (install-file "man/mcomix.1" (string-append share "/man/man1"))
471 (install-file "man/comicthumb.1" (string-append share "/man/man1"))
472 (for-each
473 (lambda (size)
474 (install-file
475 (format #f "mcomix/mcomix/images/~sx~s/mcomix.png" size size)
476 (format #f "~a/icons/hicolor/~sx~s/apps/" share size size))
477 (for-each
478 (lambda (ext)
479 (install-file
480 (format #f "mime/icons/~sx~s/application-x-~a.png" size size ext)
481 (format #f "~a/icons/hicolor/~sx~s/mimetypes/"
482 share size size)))
483 '("cb7" "cbr" "cbt" "cbz")))
484 '(16 22 24 32 48))
485 #t))))))
486 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
487 (synopsis "Image viewer for comics")
488 (description "MComix is a customizable image viewer that specializes as
4ee81d37 489a comic and manga reader. It supports a variety of container formats
e5afc63b
PN
490including CBZ, CB7, CBT, LHA.
491
492For PDF support, install the @emph{mupdf} package.")
493 (license license:gpl2+))))
87036462
NG
494
495(define-public qview
496 (package
497 (name "qview")
4f620bbf
NG
498 (version "3.0")
499 (source
500 (origin
501 (method git-fetch)
502 (uri (git-reference
b0e7b699 503 (url "https://github.com/jurplel/qView")
4f620bbf
NG
504 (commit version)))
505 (file-name (git-file-name name version))
506 (sha256
507 (base32 "15a91bs3wcqhgf76wzigbn10hayg628j84pq4j2vaxar94ak0vk7"))))
87036462
NG
508 (build-system gnu-build-system)
509 (arguments
510 `(#:phases
511 (modify-phases %standard-phases
512 (replace 'configure
513 (lambda _
514 (invoke "qmake")))
515 ;; Installation process hard-codes "/usr/bin", possibly
516 ;; prefixed.
517 (add-after 'configure 'fix-install-directory
518 (lambda* (#:key outputs #:allow-other-keys)
519 (let ((out (assoc-ref outputs "out")))
520 (substitute* "Makefile"
521 (("\\$\\(INSTALL_ROOT\\)/usr") out))
522 #t)))
523 ;; Don't phone home or show "Checking for updates..." in the
524 ;; About menu.
525 (add-before 'build 'disable-auto-update
526 (lambda _
527 (substitute* "src/qvaboutdialog.cpp"
528 (("ui->updateLabel->setText\\(updateText\\);") "")
529 (("requestUpdates\\(\\);") ""))
530 #t)))))
531 (inputs
532 `(("qtbase" ,qtbase)
533 ("qtsvg" ,qtsvg)
534 ("qtimageformats" ,qtimageformats)))
535 (home-page "https://interversehq.com/qview/")
536 (synopsis "Convenient and minimal image viewer")
537 (description "qView is a Qt image viewer designed with visually
538minimalism and usability in mind. Its features include animated GIF
539controls, file history, rotation/mirroring, and multithreaded
540preloading.")
541 (license license:gpl3+)))
52bb05c7 542
543(define-public chafa
544 (package
545 (name "chafa")
a0570377 546 (version "1.4.1")
52bb05c7 547 (source (origin
548 (method url-fetch)
549 (uri (string-append "https://hpjansson.org/chafa/releases/chafa-"
550 version ".tar.xz"))
551 (sha256
552 (base32
a0570377 553 "18rb82bfqj1sj2g4irazx4lwq9q4b4k7my1r0q714vf9yhs41ls6"))))
52bb05c7 554 (build-system gnu-build-system)
555 (native-inputs
556 `(("pkg-config" ,pkg-config)))
557 (inputs
a0570377 558 `(("freetype" ,freetype)
559 ("libjpeg" ,libjpeg-turbo)
560 ("glib" ,glib)
52bb05c7 561 ("imagemagick" ,imagemagick)))
562 (synopsis "Convert images to ANSI/Unicode characters")
563 (description
564 "Chafa is a command-line utility that converts all kinds of images,
565including animated GIFs, into ANSI/Unicode character output that can be
566displayed in a terminal.")
567 (home-page "https://hpjansson.org/chafa/")
568 (license license:lgpl3+)))
cd819b45
PMY
569
570(define-public imv
571 (package
572 (name "imv")
573 (version "4.1.0")
574 (source (origin
575 (method git-fetch)
576 (uri (git-reference
577 (url "https://github.com/eXeC64/imv")
578 (commit (string-append "v" version))))
579 (sha256
580 (base32
581 "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx"))
582 (file-name (git-file-name name version))))
583 (build-system gnu-build-system)
584 (arguments
585 '(#:phases
586 (modify-phases %standard-phases
51c87770
LC
587 (delete 'configure)
588 (add-after 'install 'record-absolute-file-names
589 (lambda* (#:key outputs #:allow-other-keys)
590 ;; 'imv' is a script that execs 'imv-x11' or 'imv-wayland'.
591 ;; Record their absolute file name.
592 (let* ((out (assoc-ref outputs "out"))
593 (bin (string-append out "/bin")))
594 (substitute* (string-append bin "/imv")
595 (("imv-")
596 (string-append bin "/imv-")))
597 #t))))
cd819b45
PMY
598 #:make-flags
599 (list "CC=gcc"
600 (string-append "PREFIX=" (assoc-ref %outputs "out"))
601 (string-append "CONFIGPREFIX="
602 (assoc-ref %outputs "out") "/etc"))))
603 (inputs
604 `(("asciidoc" ,asciidoc)
605 ("freeimage" ,freeimage)
606 ("glu" ,glu)
607 ("librsvg" ,librsvg)
608 ("libxkbcommon" ,libxkbcommon)
609 ("pango" ,pango)
610 ("wayland" ,wayland)))
611 (native-inputs
612 `(("cmocka" ,cmocka)
613 ("pkg-config" ,pkg-config)))
614 (synopsis "Image viewer for tiling window managers")
615 (description "@code{imv} is a command line image viewer intended for use
616with tiling window managers. Features include:
617
618@itemize
619@item Native Wayland and X11 support.
620@item Support for dozens of image formats including:
621@itemize
622@item PNG
623@item JPEG
624@item Animated GIFs
625@item SVG
626@item TIFF
627@item Various RAW formats
628@item Photoshop PSD files
629@end itemize
630@item Configurable key bindings and behavior.
631@item Highly scriptable with IPC via imv-msg.
632@end itemize\n")
633 (home-page "https://github.com/eXeC64/imv")
634 (license license:expat)))
e2bd0af3
VK
635
636(define-public qiv
637 (package
638 (name "qiv")
639 (version "2.3.1")
640 (source
641 (origin
642 (method url-fetch)
643 (uri (string-append "http://spiegl.de/qiv/download/qiv-"
644 version ".tgz"))
645 (sha256
646 (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7"))))
647 (build-system gnu-build-system)
648 (native-inputs
649 `(("pkg-config" ,pkg-config)
650 ;; That is required for testing.
651 ("xorg-server" ,xorg-server-for-tests)))
652 (inputs
653 `(("imlib2" ,imlib2)
654 ("glib" ,glib)
655 ("gtk+" ,gtk+-2)
656 ("lcms" ,lcms)
27783023 657 ("libjpeg" ,libjpeg-turbo)
e2bd0af3
VK
658 ("libtiff" ,libtiff)
659 ("libexif" ,libexif)
660 ("libx11" ,libx11)
661 ("libxext" ,libxext)))
662 (arguments
663 `(#:phases
664 (modify-phases %standard-phases
665 (delete 'configure) ; no configure script
666 (add-before 'install 'patch-file-start-xserver
667 (lambda* (#:key inputs #:allow-other-keys)
668 ;; patch the file so that qiv runs and exits by itself
669 (substitute* "Makefile"
670 (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg")
671 ;; Fail the build when test fails.
672 (("echo \"-- Test Failed --\"")
673 "(echo \"-- Test Failed --\" ; false)"))
674 ;; There must be a running X server and make install doesn't start one.
675 ;; Therefore we must do it.
676 (system "Xvfb :1 &")
677 (setenv "DISPLAY" ":1")
678 #t)))
679 #:tests? #f ; there is no check target
680 #:make-flags
681 (list
682 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
683 (home-page "http://spiegl.de/qiv/")
684 (synopsis "Graphical image viewer for X")
685 (description
686 "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer.
687Features include zoom, maxpect, scale down, fullscreen, slideshow, delete,
688brightness/contrast/gamma correction, pan with keyboard and mouse, flip,
689rotate left/right, jump/forward/backward images, filename filter and use it
690to set X desktop background.")
691 (license license:gpl2)))