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