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