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