Commit | Line | Data |
---|---|---|
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> |
21169e31 | 11 | ;;; Copyright © 2018 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) |
e79bfa18 LC |
57 | #:use-module (gnu packages qt) |
58 | #:use-module (gnu packages xorg) | |
59 | #:use-module (gnu packages)) | |
d1a5b200 AK |
60 | |
61 | (define-public feh | |
62 | (package | |
63 | (name "feh") | |
6fac1064 | 64 | (version "3.1.1") |
d1a5b200 AK |
65 | (home-page "https://feh.finalrewind.org/") |
66 | (source (origin | |
67 | (method url-fetch) | |
68 | (uri (string-append home-page | |
69 | name "-" version ".tar.bz2")) | |
70 | (sha256 | |
71 | (base32 | |
6fac1064 | 72 | "1sy8z6rv5sy1bhk3846hgfdy96wdi874yr2fnxfprks46qp29l31")))) |
d1a5b200 AK |
73 | (build-system gnu-build-system) |
74 | (arguments | |
dc1d3cde | 75 | '(#:phases (modify-phases %standard-phases (delete 'configure)) |
83a7a88f | 76 | #:test-target "test" |
dc1d3cde | 77 | #:make-flags |
0de33cb3 LF |
78 | (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")) |
79 | "exif=1"))) | |
83a7a88f MB |
80 | (native-inputs |
81 | `(("perl" ,perl) | |
82 | ("perl-test-command" ,perl-test-command))) | |
d1a5b200 AK |
83 | (inputs `(("imlib2" ,imlib2) |
84 | ("curl" ,curl) | |
0de33cb3 | 85 | ("libexif" ,libexif) |
d1a5b200 AK |
86 | ("libpng" ,libpng) |
87 | ("libxt" ,libxt) | |
88 | ("libx11" ,libx11) | |
89 | ("libxinerama" ,libxinerama))) | |
3c41b992 MB |
90 | (native-search-paths |
91 | ;; Feh allows overriding the libcurl builtin CA path (unset in Guix) | |
92 | ;; with the same variable as the `curl` command line HTTP tool. | |
dc138d6d | 93 | (package-native-search-paths curl)) |
d1a5b200 AK |
94 | (synopsis "Fast and light imlib2-based image viewer") |
95 | (description | |
96 | "feh is an X11 image viewer aimed mostly at console users. | |
97 | Unlike most other viewers, it does not have a fancy GUI, but simply | |
98 | displays images. It can also be used to set the desktop wallpaper. | |
99 | It is controlled via commandline arguments and configurable key/mouse | |
100 | actions.") | |
101 | ||
102 | ;; The license is really the Expat license, with additional wording in the | |
103 | ;; 2nd paragraph: "acknowledgment shall be given in the documentation and | |
104 | ;; software packages that this Software was used." | |
105 | (license (license:x11-style | |
106 | "file://COPYING" | |
107 | "See 'COPYING' in the distribution.")))) | |
108 | ||
109 | (define-public geeqie | |
110 | (package | |
111 | (name "geeqie") | |
e784e256 | 112 | (version "1.4") |
d1a5b200 AK |
113 | (source (origin |
114 | (method url-fetch) | |
115 | (uri (string-append "https://github.com/BestImageViewer/geeqie/" | |
116 | "releases/download/v" version "/geeqie-" | |
117 | version ".tar.xz")) | |
118 | (sha256 | |
119 | (base32 | |
e784e256 | 120 | "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w")))) |
d1a5b200 AK |
121 | (build-system gnu-build-system) |
122 | (arguments | |
048175e2 LC |
123 | `(;; Enable support for a "map" pane using GPS data. |
124 | #:configure-flags '("--enable-map") | |
125 | ||
126 | #:phases | |
d1a5b200 AK |
127 | (modify-phases %standard-phases |
128 | (add-after 'unpack 'autogen | |
129 | (lambda _ | |
e784e256 LC |
130 | (define (write-dummy-changelog port) |
131 | (display "See Git history for a change log.\n" port)) | |
132 | ||
d1a5b200 | 133 | (setenv "NOCONFIGURE" "true") |
e784e256 LC |
134 | |
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) | |
141 | ||
d1a5b200 AK |
142 | (zero? (system* "sh" "autogen.sh"))))))) |
143 | (inputs | |
048175e2 LC |
144 | `(("clutter" ,clutter) |
145 | ("libchamplain" ,libchamplain) | |
d1a5b200 AK |
146 | ("lcms" ,lcms) |
147 | ("exiv2" ,exiv2) | |
148 | ("libpng" ,libpng) | |
149 | ("gtk+" ,gtk+-2))) | |
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 | |
160 | systems. It features: EXIF, IPTC and XMP metadata browsing and editing | |
161 | interoperability; easy integration with other software; geeqie works on files | |
162 | and directories, there is no need to import images; fast preview for many raw | |
163 | image formats; tools for image comparison, sorting and managing photo | |
164 | collection. 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. | |
186 | It 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") | |
6c162d0e | 193 | (version "24") |
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 | |
92f08e14 | 202 | "020n1bdxbzqncprh8a4rnjzc4frp335yxbqh5w6dr970f7n5qm8d")))) |
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. | |
211 | (string-append "DEF_CPPFLAGS=-I" | |
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 | |
229 | provide the most basic features required for fast image viewing. It has | |
230 | vi key bindings and works nicely with tiling window managers. Its code | |
231 | base should be kept small and clean to make it easy for you to dig into | |
232 | it 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 | |
241 | (method url-fetch) | |
307cdd66 | 242 | (uri (string-append "https://github.com/hellosiyan/Viewnior/archive/" |
eb55f018 EF |
243 | name "-" version ".tar.gz")) |
244 | (sha256 | |
245 | (base32 | |
307cdd66 EF |
246 | "1rpkk721s3xas125q3g0fl11b5zsrmzv9pzl6ddzcy4sj2rd7ymr")))) |
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, | |
270 | fast and elegant. Its minimalistic interface provides more screenspace for | |
271 | your 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 | |
304 | (replace 'configure | |
305 | (lambda* (#:key inputs #:allow-other-keys) | |
306 | (let* ((magic (assoc-ref %build-inputs "imagemagick")) | |
307 | (convert (string-append magic "/bin/convert"))) | |
308 | (substitute* "catimg" | |
309 | ;; By replacing "convert", we also replace the "convert" | |
310 | ;; in the message 'The version of convert is too old, don't | |
1e5c056c | 311 | ;; expect good results :('. This should not happen, but in |
9016dbc2 | 312 | ;; practice this error message should not affect us. |
313 | (("convert") convert)) | |
314 | #t))) | |
315 | (replace 'build | |
316 | (lambda _ | |
1e5c056c TGR |
317 | (let* ((out (assoc-ref %outputs "out")) |
318 | (man (string-append out "/share/man/man1"))) | |
319 | (zero? (system* "cmake" | |
320 | (string-append "-DCMAKE_INSTALL_PREFIX=" out) | |
321 | (string-append "-DMAN_OUTPUT_PATH=" man) | |
322 | ".")) | |
323 | (zero? (system* "make"))))) | |
9016dbc2 | 324 | (add-before 'install 'install-script |
325 | (lambda* (#:key outputs #:allow-other-keys) | |
1e5c056c | 326 | ;; The bash script lacks an file extension. We have to rename |
9016dbc2 | 327 | ;; it so that the C program and the bash script can be happy |
328 | ;; side by side. | |
329 | (let* ((out (assoc-ref outputs "out")) | |
330 | (bin (string-append out "/bin"))) | |
331 | (install-file "catimg" bin) | |
332 | (rename-file (string-append bin "/catimg") | |
333 | (string-append bin "/catimg.sh")) | |
334 | #t)))))) | |
335 | (inputs | |
1e5c056c | 336 | `(("imagemagick" ,imagemagick))) ; for the bash script version |
9016dbc2 | 337 | (home-page "https://github.com/posva/catimg") |
338 | (synopsis "Render images in the terminal") | |
339 | (description | |
340 | "Catimg is a little program that prints images in the terminal. | |
341 | It supports JPEG, PNG and GIF formats.") | |
342 | (license license:expat))) | |
e79bfa18 LC |
343 | |
344 | (define-public luminance-hdr | |
345 | (package | |
346 | (name "luminance-hdr") | |
347 | (version "2.4.0") | |
348 | (source (origin | |
349 | (method url-fetch) | |
350 | (uri (string-append | |
351 | "mirror://sourceforge/qtpfsgui/luminance/" | |
352 | version "/luminance-hdr-" version ".tar.bz2")) | |
353 | (sha256 | |
354 | (base32 | |
355 | "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l")) | |
356 | (patches (search-patches "luminance-hdr-qt-printer.patch")))) | |
357 | (build-system cmake-build-system) | |
358 | (native-inputs | |
359 | `(("pkg-config" ,pkg-config) | |
360 | ("qttools" ,qttools))) | |
361 | (inputs | |
362 | `(("qtbase" ,qtbase) | |
363 | ("qtdeclarative" ,qtdeclarative) | |
364 | ("qtwebkit" ,qtwebkit) | |
365 | ("boost" ,boost) | |
366 | ;; ("gtest" ,gtest) | |
367 | ("libraw" ,libraw) | |
368 | ("zlib" ,zlib) | |
369 | ("exiv2" ,exiv2) | |
370 | ("libpng" ,libpng) | |
371 | ("libjpeg" ,libjpeg) | |
372 | ("lcms" ,lcms) | |
373 | ("openexr" ,openexr) | |
374 | ("fftw" ,fftwf) | |
375 | ("gsl" ,gsl) | |
376 | ("libtiff" ,libtiff))) | |
377 | (arguments | |
378 | '(#:phases | |
379 | (modify-phases %standard-phases | |
380 | (add-after 'set-paths 'add-ilmbase-include-path | |
381 | (lambda* (#:key inputs #:allow-other-keys) | |
382 | ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does | |
383 | ;; not use 'OpenEXR.pc'. Thus, we need to add | |
384 | ;; "$ilmbase/include/OpenEXR/" to the CPATH. | |
385 | (setenv "CPATH" | |
386 | (string-append (assoc-ref inputs "ilmbase") | |
387 | "/include/OpenEXR" | |
388 | ":" (or (getenv "CPATH") ""))) | |
389 | #t))))) | |
390 | (home-page "http://qtpfsgui.sourceforge.net") | |
391 | (synopsis "High dynamic range (HDR) imaging application") | |
392 | (description | |
393 | "Luminance HDR (formerly QtPFSGui) is a graphical user interface | |
394 | application that aims to provide a workflow for high dynamic range (HDR) | |
395 | imaging. It supports several HDR and LDR image formats, and it can: | |
396 | ||
397 | @itemize | |
398 | @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and | |
399 | 16bit, RAW) of the same scene taken at different exposure setting; | |
400 | @item Save load HDR images; | |
401 | @item Rotate, resize and crop HDR images; | |
402 | @item Tone-map HDR images; | |
403 | @item Copy EXIF data between sets of images. | |
404 | @end itemize\n") | |
405 | (license license:gpl2+))) | |
4ee81d37 | 406 | |
407 | ;; CBR and RAR are currently unsupported, due to non-free dependencies. | |
408 | ;; For optional PDF support, you can install the mupdf package. | |
409 | (define-public mcomix | |
410 | (package | |
411 | (name "mcomix") | |
412 | (version "1.2.1") | |
413 | (source | |
414 | (origin | |
415 | (method url-fetch) | |
416 | (uri (string-append "mirror://sourceforge/mcomix/MComix-" version | |
417 | "/mcomix-" version ".tar.bz2")) | |
418 | (sha256 | |
419 | (base32 | |
420 | "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy")))) | |
421 | (build-system python-build-system) | |
422 | (inputs | |
423 | `(("p7zip" ,p7zip) | |
424 | ("python2-pillow" ,python2-pillow) | |
425 | ("python2-pygtk" ,python2-pygtk))) | |
426 | (arguments | |
427 | ;; Python 2.5 or newer (Python 3 and up is not supported) | |
428 | `(#:python ,python-2 | |
21169e31 | 429 | #:tests? #f ; there are no tests |
4ee81d37 | 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/archive/sevenzip_external.py" | |
437 | (("_7z_executable = -1") | |
438 | (string-append "_7z_executable = u'" p7zip "/bin/7z'")))) | |
439 | #t))))) | |
440 | (home-page "https://sourceforge.net/p/mcomix/wiki/Home/") | |
441 | (synopsis "Image viewer for comics") | |
442 | (description "MComix is a customizable image viewer that specializes as | |
443 | a comic and manga reader. It supports a variety of container formats | |
444 | including CBZ, CB7, CBT, LHA.") | |
445 | (license license:gpl2+))) |