gnu: igt-gpu-tools: Don't use NAME in source URI.
[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>
4a78fd46 7;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
ed3a9ec5 8;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4ee81d37 9;;; Copyright © 2017 nee <nee-git@hidamari.blue>
6c162d0e 10;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
027f97b1 11;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
eb55f018 12;;;
d1a5b200
AK
13;;; This file is part of GNU Guix.
14;;;
eb55f018
EF
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages image-viewers)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix download)
92f08e14 31 #:use-module (guix git-download)
eb55f018
EF
32 #:use-module (guix packages)
33 #:use-module (guix build-system gnu)
9016dbc2 34 #:use-module (guix build-system cmake)
307cdd66 35 #:use-module (guix build-system meson)
4ee81d37 36 #:use-module (guix build-system python)
eb55f018 37 #:use-module (gnu packages autotools)
e79bfa18 38 #:use-module (gnu packages algebra)
e79bfa18
LC
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages compression)
d1a5b200 41 #:use-module (gnu packages curl)
6c162d0e 42 #:use-module (gnu packages fontutils)
307cdd66 43 #:use-module (gnu packages gettext)
d1a5b200 44 #:use-module (gnu packages ghostscript)
eb55f018
EF
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gtk)
e79bfa18 48 #:use-module (gnu packages graphics)
023f0fb0 49 #:use-module (gnu packages image)
9016dbc2 50 #:use-module (gnu packages imagemagick)
e79bfa18 51 #:use-module (gnu packages maths)
83a7a88f 52 #:use-module (gnu packages perl)
5ccde207 53 #:use-module (gnu packages perl-check)
d1a5b200
AK
54 #:use-module (gnu packages photo)
55 #:use-module (gnu packages pkg-config)
4ee81d37 56 #:use-module (gnu packages python)
44d10b1f 57 #:use-module (gnu packages python-xyz)
e79bfa18
LC
58 #:use-module (gnu packages qt)
59 #:use-module (gnu packages xorg)
60 #:use-module (gnu packages))
d1a5b200
AK
61
62(define-public feh
63 (package
64 (name "feh")
6fac1064 65 (version "3.1.1")
d1a5b200
AK
66 (home-page "https://feh.finalrewind.org/")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append home-page
70 name "-" version ".tar.bz2"))
71 (sha256
72 (base32
6fac1064 73 "1sy8z6rv5sy1bhk3846hgfdy96wdi874yr2fnxfprks46qp29l31"))))
d1a5b200
AK
74 (build-system gnu-build-system)
75 (arguments
dc1d3cde 76 '(#:phases (modify-phases %standard-phases (delete 'configure))
83a7a88f 77 #:test-target "test"
dc1d3cde 78 #:make-flags
0de33cb3
LF
79 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))
80 "exif=1")))
83a7a88f
MB
81 (native-inputs
82 `(("perl" ,perl)
83 ("perl-test-command" ,perl-test-command)))
d1a5b200
AK
84 (inputs `(("imlib2" ,imlib2)
85 ("curl" ,curl)
0de33cb3 86 ("libexif" ,libexif)
d1a5b200
AK
87 ("libpng" ,libpng)
88 ("libxt" ,libxt)
89 ("libx11" ,libx11)
90 ("libxinerama" ,libxinerama)))
3c41b992
MB
91 (native-search-paths
92 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
93 ;; with the same variable as the `curl` command line HTTP tool.
dc138d6d 94 (package-native-search-paths curl))
d1a5b200
AK
95 (synopsis "Fast and light imlib2-based image viewer")
96 (description
97 "feh is an X11 image viewer aimed mostly at console users.
98Unlike most other viewers, it does not have a fancy GUI, but simply
99displays images. It can also be used to set the desktop wallpaper.
100It is controlled via commandline arguments and configurable key/mouse
101actions.")
102
103 ;; The license is really the Expat license, with additional wording in the
104 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
105 ;; software packages that this Software was used."
106 (license (license:x11-style
107 "file://COPYING"
108 "See 'COPYING' in the distribution."))))
109
110(define-public geeqie
111 (package
112 (name "geeqie")
e784e256 113 (version "1.4")
d1a5b200
AK
114 (source (origin
115 (method url-fetch)
116 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
117 "releases/download/v" version "/geeqie-"
118 version ".tar.xz"))
119 (sha256
120 (base32
e784e256 121 "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w"))))
d1a5b200
AK
122 (build-system gnu-build-system)
123 (arguments
048175e2
LC
124 `(;; Enable support for a "map" pane using GPS data.
125 #:configure-flags '("--enable-map")
126
127 #:phases
d1a5b200 128 (modify-phases %standard-phases
027f97b1 129 (add-before 'bootstrap 'pre-bootstrap
d1a5b200 130 (lambda _
e784e256
LC
131 (define (write-dummy-changelog port)
132 (display "See Git history for a change log.\n" port))
e784e256
LC
133 ;; Create ChangeLog{,.html} to placate the makefile, which would
134 ;; otherwise require access to the Git repo.
135 (call-with-output-file "ChangeLog"
136 write-dummy-changelog)
137 (call-with-output-file "ChangeLog.html"
138 write-dummy-changelog)
027f97b1
RW
139 (setenv "NOCONFIGURE" "true")
140 #t)))))
d1a5b200 141 (inputs
048175e2
LC
142 `(("clutter" ,clutter)
143 ("libchamplain" ,libchamplain)
d1a5b200
AK
144 ("lcms" ,lcms)
145 ("exiv2" ,exiv2)
146 ("libpng" ,libpng)
5d3f16e4 147 ("gtk+" ,gtk+)))
d1a5b200
AK
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
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.")
163 (license license:gpl2+)))
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)
179 ("libjpeg" ,libjpeg)))
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")
6c162d0e 191 (version "24")
d1a5b200 192 (source (origin
92f08e14
RW
193 (method git-fetch)
194 (uri (git-reference
195 (url "https://github.com/muennich/sxiv.git")
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
d1a5b200
AK
198 (sha256
199 (base32
92f08e14 200 "020n1bdxbzqncprh8a4rnjzc4frp335yxbqh5w6dr970f7n5qm8d"))))
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)
206 "CC=gcc"
207 ;; Xft.h #includes <ft2build.h> (without ‘freetype2/’). The sxiv
208 ;; Makefile works around this by hard-coding /usr/include instead.
209 (string-append "DEF_CPPFLAGS=-I"
210 (assoc-ref %build-inputs "freetype")
211 "/include/freetype2")
212 "V=1")
213 #:phases
214 (modify-phases %standard-phases
215 (delete 'configure)))) ; no configure script
d1a5b200 216 (inputs
6c162d0e 217 `(("freetype" ,freetype)
d1a5b200 218 ("giflib" ,giflib)
6c162d0e
TGR
219 ("imlib2" ,imlib2)
220 ("libexif" ,libexif)
221 ("libx11" ,libx11)
222 ("libxft" ,libxft)))
d1a5b200
AK
223 (home-page "https://github.com/muennich/sxiv")
224 (synopsis "Simple X Image Viewer")
225 (description
226 "sxiv is an alternative to feh and qiv. Its primary goal is to
227provide the most basic features required for fast image viewing. It has
228vi key bindings and works nicely with tiling window managers. Its code
229base should be kept small and clean to make it easy for you to dig into
230it and customize it for your needs.")
231 (license license:gpl2+)))
eb55f018
EF
232
233(define-public viewnior
234 (package
235 (name "viewnior")
307cdd66 236 (version "1.7")
eb55f018
EF
237 (source
238 (origin
83541fb6
EF
239 (method git-fetch)
240 (uri (git-reference
241 (url "https://github.com/hellosiyan/Viewnior.git")
242 (commit (string-append name "-" version))))
243 (file-name (git-file-name name version))
eb55f018
EF
244 (sha256
245 (base32
83541fb6 246 "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
307cdd66 247 (build-system meson-build-system)
eb55f018
EF
248 (arguments
249 '(#:phases
250 (modify-phases %standard-phases
307cdd66 251 (add-after 'unpack 'patch-source
ea77385c
EF
252 (lambda _
253 ;; Don't create 'icon-theme.cache'
307cdd66
EF
254 (substitute* "meson.build"
255 (("meson.add_install_script*") ""))
256 #t)))
257 #:tests? #f)) ; no tests
eb55f018 258 (native-inputs
307cdd66 259 `(("gettext" ,gettext-minimal)
eb55f018 260 ("glib" ,glib "bin") ; glib-genmarshal
eb55f018 261 ("pkg-config" ,pkg-config)
307cdd66 262 ("shared-mime-info" ,shared-mime-info)))
eb55f018
EF
263 (inputs
264 `(("exiv2" ,exiv2)
265 ("gdk-pixbuf" ,gdk-pixbuf)
266 ("gtk+-2" ,gtk+-2)))
307cdd66 267 (home-page "http://siyanpanayotov.com/project/viewnior")
eb55f018
EF
268 (synopsis "Simple, fast and elegant image viewer")
269 (description "Viewnior is an image viewer program. Created to be simple,
270fast and elegant. Its minimalistic interface provides more screenspace for
271your images. Among its features are:
272@enumerate
273@item Fullscreen & Slideshow
274@item Rotate, flip, crop, save, delete images
275@item Animation support
276@item Browse only selected images
277@item Navigation window
278@item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
279@item Simple interface
280@item EXIF and IPTC metadata
281@item Configurable mouse actions
282@end enumerate\n")
283 (license license:gpl3+)))
9016dbc2 284
285(define-public catimg
286 (package
287 (name "catimg")
ddde3f6b 288 (version "2.4.0")
9016dbc2 289 (source
290 (origin
6f6f9267
RW
291 (method git-fetch)
292 (uri (git-reference
293 (url "https://github.com/posva/catimg.git")
294 (commit (string-append "v" version))))
295 (file-name (git-file-name name version))
9016dbc2 296 (sha256
297 (base32
6f6f9267 298 "1sk74nfc1aklg784pzknr37dyz4k7h9fck3mifpn43rav5qy2zpy"))))
9016dbc2 299 (build-system cmake-build-system)
300 (arguments
1e5c056c 301 `(#:tests? #f ; no tests
9016dbc2 302 #:phases
303 (modify-phases %standard-phases
e2f47efe 304 (add-after 'unpack 'patch-convert
9016dbc2 305 (lambda _
e2f47efe
RW
306 (substitute* "catimg"
307 ;; By replacing "convert", we also replace the "convert"
308 ;; in the message 'The version of convert is too old, don't
309 ;; expect good results :('. This should not happen, but in
310 ;; practice this error message should not affect us.
311 (("convert") (which "convert")))
312 #t))
313 (add-after 'install 'install-script
9016dbc2 314 (lambda* (#:key outputs #:allow-other-keys)
1e5c056c 315 ;; The bash script lacks an file extension. We have to rename
9016dbc2 316 ;; it so that the C program and the bash script can be happy
317 ;; side by side.
e2f47efe
RW
318 (copy-file "../source/catimg"
319 (string-append (assoc-ref outputs "out")
320 "/bin/catimg.sh"))
321 #t)))))
9016dbc2 322 (inputs
1e5c056c 323 `(("imagemagick" ,imagemagick))) ; for the bash script version
9016dbc2 324 (home-page "https://github.com/posva/catimg")
325 (synopsis "Render images in the terminal")
326 (description
327 "Catimg is a little program that prints images in the terminal.
328It supports JPEG, PNG and GIF formats.")
329 (license license:expat)))
e79bfa18
LC
330
331(define-public luminance-hdr
332 (package
333 (name "luminance-hdr")
334 (version "2.4.0")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append
338 "mirror://sourceforge/qtpfsgui/luminance/"
339 version "/luminance-hdr-" version ".tar.bz2"))
340 (sha256
341 (base32
342 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
343 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
344 (build-system cmake-build-system)
345 (native-inputs
346 `(("pkg-config" ,pkg-config)
347 ("qttools" ,qttools)))
348 (inputs
349 `(("qtbase" ,qtbase)
350 ("qtdeclarative" ,qtdeclarative)
351 ("qtwebkit" ,qtwebkit)
352 ("boost" ,boost)
353 ;; ("gtest" ,gtest)
354 ("libraw" ,libraw)
355 ("zlib" ,zlib)
356 ("exiv2" ,exiv2)
357 ("libpng" ,libpng)
358 ("libjpeg" ,libjpeg)
359 ("lcms" ,lcms)
360 ("openexr" ,openexr)
361 ("fftw" ,fftwf)
362 ("gsl" ,gsl)
363 ("libtiff" ,libtiff)))
364 (arguments
365 '(#:phases
366 (modify-phases %standard-phases
367 (add-after 'set-paths 'add-ilmbase-include-path
368 (lambda* (#:key inputs #:allow-other-keys)
369 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
370 ;; not use 'OpenEXR.pc'. Thus, we need to add
371 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
372 (setenv "CPATH"
373 (string-append (assoc-ref inputs "ilmbase")
374 "/include/OpenEXR"
375 ":" (or (getenv "CPATH") "")))
376 #t)))))
377 (home-page "http://qtpfsgui.sourceforge.net")
378 (synopsis "High dynamic range (HDR) imaging application")
379 (description
380 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
381application that aims to provide a workflow for high dynamic range (HDR)
382imaging. It supports several HDR and LDR image formats, and it can:
383
384@itemize
385@item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
38616bit, RAW) of the same scene taken at different exposure setting;
387@item Save load HDR images;
388@item Rotate, resize and crop HDR images;
389@item Tone-map HDR images;
390@item Copy EXIF data between sets of images.
391@end itemize\n")
392 (license license:gpl2+)))
4ee81d37 393
394;; CBR and RAR are currently unsupported, due to non-free dependencies.
395;; For optional PDF support, you can install the mupdf package.
396(define-public mcomix
397 (package
398 (name "mcomix")
399 (version "1.2.1")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
404 "/mcomix-" version ".tar.bz2"))
405 (sha256
406 (base32
407 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
408 (build-system python-build-system)
409 (inputs
410 `(("p7zip" ,p7zip)
411 ("python2-pillow" ,python2-pillow)
412 ("python2-pygtk" ,python2-pygtk)))
413 (arguments
414 ;; Python 2.5 or newer (Python 3 and up is not supported)
415 `(#:python ,python-2
21169e31 416 #:tests? #f ; there are no tests
4ee81d37 417 #:phases
418 (modify-phases %standard-phases
419 (add-after 'unpack 'configure
420 (lambda* (#:key inputs #:allow-other-keys)
421 (let ((p7zip (assoc-ref inputs "p7zip")))
422 ;; insert absolute path to 7z executable
423 (substitute* "mcomix/archive/sevenzip_external.py"
424 (("_7z_executable = -1")
425 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
426 #t)))))
427 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
428 (synopsis "Image viewer for comics")
429 (description "MComix is a customizable image viewer that specializes as
430a comic and manga reader. It supports a variety of container formats
431including CBZ, CB7, CBT, LHA.")
432 (license license:gpl2+)))