Commit | Line | Data |
---|---|---|
d1a5b200 | 1 | ;;; GNU Guix --- Functional package management for GNU |
e79bfa18 | 2 | ;;; Copyright © 2013, 2017 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> | |
ea77385c | 5 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
f7e9f1ca | 6 | ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com> |
9016dbc2 | 7 | ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net> |
ed3a9ec5 | 8 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
4ee81d37 | 9 | ;;; Copyright © 2017 nee <nee-git@hidamari.blue> |
eb55f018 | 10 | ;;; |
d1a5b200 AK |
11 | ;;; This file is part of GNU Guix. |
12 | ;;; | |
eb55f018 EF |
13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
14 | ;;; under the terms of the GNU General Public License as published by | |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
18 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
26 | (define-module (gnu packages image-viewers) | |
27 | #:use-module ((guix licenses) #:prefix license:) | |
28 | #:use-module (guix download) | |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix build-system gnu) | |
9016dbc2 | 31 | #:use-module (guix build-system cmake) |
4ee81d37 | 32 | #:use-module (guix build-system python) |
eb55f018 | 33 | #:use-module (gnu packages autotools) |
e79bfa18 | 34 | #:use-module (gnu packages algebra) |
eb55f018 | 35 | #:use-module (gnu packages base) |
e79bfa18 LC |
36 | #:use-module (gnu packages boost) |
37 | #:use-module (gnu packages compression) | |
d1a5b200 AK |
38 | #:use-module (gnu packages curl) |
39 | #:use-module (gnu packages ghostscript) | |
eb55f018 EF |
40 | #:use-module (gnu packages glib) |
41 | #:use-module (gnu packages gnome) | |
42 | #:use-module (gnu packages gtk) | |
e79bfa18 | 43 | #:use-module (gnu packages graphics) |
023f0fb0 | 44 | #:use-module (gnu packages image) |
9016dbc2 | 45 | #:use-module (gnu packages imagemagick) |
e79bfa18 | 46 | #:use-module (gnu packages maths) |
83a7a88f | 47 | #:use-module (gnu packages perl) |
5ccde207 | 48 | #:use-module (gnu packages perl-check) |
d1a5b200 AK |
49 | #:use-module (gnu packages photo) |
50 | #:use-module (gnu packages pkg-config) | |
4ee81d37 | 51 | #:use-module (gnu packages python) |
e79bfa18 LC |
52 | #:use-module (gnu packages qt) |
53 | #:use-module (gnu packages xorg) | |
54 | #:use-module (gnu packages)) | |
d1a5b200 AK |
55 | |
56 | (define-public feh | |
57 | (package | |
58 | (name "feh") | |
3aad4ed3 | 59 | (version "2.23") |
d1a5b200 AK |
60 | (home-page "https://feh.finalrewind.org/") |
61 | (source (origin | |
62 | (method url-fetch) | |
63 | (uri (string-append home-page | |
64 | name "-" version ".tar.bz2")) | |
65 | (sha256 | |
66 | (base32 | |
3aad4ed3 | 67 | "18922zv8ckm82r1ap1yn7plbk6djpj02za2ahng58sjj2fw3rpqn")))) |
d1a5b200 AK |
68 | (build-system gnu-build-system) |
69 | (arguments | |
dc1d3cde | 70 | '(#:phases (modify-phases %standard-phases (delete 'configure)) |
83a7a88f | 71 | #:test-target "test" |
dc1d3cde KK |
72 | #:make-flags |
73 | (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
83a7a88f MB |
74 | (native-inputs |
75 | `(("perl" ,perl) | |
76 | ("perl-test-command" ,perl-test-command))) | |
d1a5b200 AK |
77 | (inputs `(("imlib2" ,imlib2) |
78 | ("curl" ,curl) | |
79 | ("libpng" ,libpng) | |
80 | ("libxt" ,libxt) | |
81 | ("libx11" ,libx11) | |
82 | ("libxinerama" ,libxinerama))) | |
3c41b992 MB |
83 | (native-search-paths |
84 | ;; Feh allows overriding the libcurl builtin CA path (unset in Guix) | |
85 | ;; with the same variable as the `curl` command line HTTP tool. | |
86 | (list (search-path-specification | |
87 | (variable "CURL_CA_BUNDLE") | |
88 | (file-type 'regular) | |
89 | (separator #f) ;single entry | |
90 | (files '("etc/ssl/certs/ca-certificates.crt"))))) | |
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") | |
109 | (version "1.3") | |
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 | |
117 | "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb")))) | |
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 _ | |
127 | (setenv "NOCONFIGURE" "true") | |
128 | (zero? (system* "sh" "autogen.sh"))))))) | |
129 | (inputs | |
048175e2 LC |
130 | `(("clutter" ,clutter) |
131 | ("libchamplain" ,libchamplain) | |
d1a5b200 AK |
132 | ("lcms" ,lcms) |
133 | ("exiv2" ,exiv2) | |
134 | ("libpng" ,libpng) | |
135 | ("gtk+" ,gtk+-2))) | |
136 | (native-inputs | |
137 | `(("autoconf" ,autoconf) | |
138 | ("automake" ,automake) | |
139 | ("glib" ,glib "bin") ; glib-gettextize | |
140 | ("intltool" ,intltool) | |
141 | ("pkg-config" ,pkg-config))) | |
142 | (home-page "http://www.geeqie.org/") | |
143 | (synopsis "Lightweight GTK+ based image viewer") | |
144 | (description | |
145 | "Geeqie is a lightweight GTK+ based image viewer for Unix like operating | |
146 | systems. It features: EXIF, IPTC and XMP metadata browsing and editing | |
147 | interoperability; easy integration with other software; geeqie works on files | |
148 | and directories, there is no need to import images; fast preview for many raw | |
149 | image formats; tools for image comparison, sorting and managing photo | |
150 | collection. Geeqie was initially based on GQview.") | |
151 | (license license:gpl2+))) | |
152 | ||
ed3a9ec5 MO |
153 | (define-public gpicview |
154 | (package | |
155 | (name "gpicview") | |
156 | (version "0.2.5") | |
157 | (source (origin | |
158 | (method url-fetch) | |
159 | (uri (string-append "mirror://sourceforge/lxde/" | |
160 | "GPicView%20%28image%20Viewer%29/0.2.x/" | |
161 | name "-" version ".tar.xz")) | |
162 | (sha256 | |
163 | (base32 | |
164 | "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq")))) | |
165 | (build-system gnu-build-system) | |
166 | (inputs `(("gtk+" ,gtk+-2) | |
167 | ("libjpeg" ,libjpeg))) | |
168 | (native-inputs `(("intltool" ,intltool) | |
169 | ("pkg-config" ,pkg-config))) | |
170 | (synopsis "Simple and fast image viewer for X") | |
171 | (description "gpicview is a lightweight GTK+ 2.x based image viewer. | |
172 | It is the default image viewer on LXDE desktop environment.") | |
173 | (home-page "http://lxde.sourceforge.net/gpicview/") | |
174 | (license license:gpl2+))) | |
175 | ||
d1a5b200 AK |
176 | (define-public sxiv |
177 | (package | |
178 | (name "sxiv") | |
179 | (version "1.3.2") | |
180 | (source (origin | |
181 | (method url-fetch) | |
182 | (uri (string-append | |
183 | "https://github.com/muennich/sxiv/archive/v" | |
184 | version ".tar.gz")) | |
185 | (file-name (string-append name "-" version ".tar.gz")) | |
186 | (sha256 | |
187 | (base32 | |
188 | "0lxnd33gaw4drhdwbkk94wzrjyhh64d57jq2ps7ffmqgizg6hlwz")))) | |
189 | (build-system gnu-build-system) | |
190 | (arguments | |
191 | '(#:tests? #f ; no check target | |
192 | #:make-flags (list (string-append "PREFIX=" %output) | |
193 | "CC=gcc") | |
dc1d3cde KK |
194 | ;; no configure phase |
195 | #:phases (modify-phases %standard-phases (delete 'configure)))) | |
d1a5b200 AK |
196 | (inputs |
197 | `(("libx11" ,libx11) | |
198 | ("imlib2" ,imlib2) | |
199 | ("giflib" ,giflib) | |
200 | ("libexif" ,libexif))) | |
201 | (home-page "https://github.com/muennich/sxiv") | |
202 | (synopsis "Simple X Image Viewer") | |
203 | (description | |
204 | "sxiv is an alternative to feh and qiv. Its primary goal is to | |
205 | provide the most basic features required for fast image viewing. It has | |
206 | vi key bindings and works nicely with tiling window managers. Its code | |
207 | base should be kept small and clean to make it easy for you to dig into | |
208 | it and customize it for your needs.") | |
209 | (license license:gpl2+))) | |
eb55f018 EF |
210 | |
211 | (define-public viewnior | |
212 | (package | |
213 | (name "viewnior") | |
214 | (version "1.6") | |
215 | (source | |
216 | (origin | |
217 | (method url-fetch) | |
218 | (uri (string-append "https://github.com/xsisqox/Viewnior/archive/" | |
219 | name "-" version ".tar.gz")) | |
220 | (sha256 | |
221 | (base32 | |
222 | "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9")))) | |
223 | (build-system gnu-build-system) | |
224 | (arguments | |
225 | '(#:phases | |
226 | (modify-phases %standard-phases | |
227 | (add-after 'unpack 'autogen | |
228 | (lambda _ | |
ea77385c EF |
229 | (zero? (system* "sh" "autogen.sh")))) |
230 | (add-before 'install 'skip-gtk-update-icon-cache | |
231 | (lambda _ | |
232 | ;; Don't create 'icon-theme.cache' | |
233 | (substitute* (find-files "data" "^Makefile$") | |
234 | (("gtk-update-icon-cache") (which "true"))) | |
235 | #t))))) | |
eb55f018 EF |
236 | (native-inputs |
237 | `(("automake" ,automake) | |
238 | ("autoconf" ,autoconf) | |
239 | ("intltool" ,intltool) | |
240 | ("glib" ,glib "bin") ; glib-genmarshal | |
241 | ("gnome-common" ,gnome-common) | |
242 | ("libtool" ,libtool) | |
243 | ("pkg-config" ,pkg-config) | |
244 | ("shared-mime-info" ,shared-mime-info) | |
245 | ("which" ,which))) | |
246 | (inputs | |
247 | `(("exiv2" ,exiv2) | |
248 | ("gdk-pixbuf" ,gdk-pixbuf) | |
249 | ("gtk+-2" ,gtk+-2))) | |
250 | (home-page "http://siyanpanayotov.com/project/viewnior/") | |
251 | (synopsis "Simple, fast and elegant image viewer") | |
252 | (description "Viewnior is an image viewer program. Created to be simple, | |
253 | fast and elegant. Its minimalistic interface provides more screenspace for | |
254 | your images. Among its features are: | |
255 | @enumerate | |
256 | @item Fullscreen & Slideshow | |
257 | @item Rotate, flip, crop, save, delete images | |
258 | @item Animation support | |
259 | @item Browse only selected images | |
260 | @item Navigation window | |
261 | @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen) | |
262 | @item Simple interface | |
263 | @item EXIF and IPTC metadata | |
264 | @item Configurable mouse actions | |
265 | @end enumerate\n") | |
266 | (license license:gpl3+))) | |
9016dbc2 | 267 | |
268 | (define-public catimg | |
269 | (package | |
270 | (name "catimg") | |
ddde3f6b | 271 | (version "2.4.0") |
9016dbc2 | 272 | (source |
273 | (origin | |
274 | (method url-fetch) | |
275 | (uri (string-append "https://github.com/posva/catimg/archive" | |
276 | "/v" version ".tar.gz")) | |
277 | (file-name (string-append name "-" version ".tar.gz")) | |
278 | (sha256 | |
279 | (base32 | |
ddde3f6b | 280 | "1rwgbq2imd5l4nql5hrz7rr5f4gz8aad1amlf0j3cxir8slpbd1y")))) |
9016dbc2 | 281 | (build-system cmake-build-system) |
282 | (arguments | |
1e5c056c | 283 | `(#:tests? #f ; no tests |
9016dbc2 | 284 | #:phases |
285 | (modify-phases %standard-phases | |
286 | (replace 'configure | |
287 | (lambda* (#:key inputs #:allow-other-keys) | |
288 | (let* ((magic (assoc-ref %build-inputs "imagemagick")) | |
289 | (convert (string-append magic "/bin/convert"))) | |
290 | (substitute* "catimg" | |
291 | ;; By replacing "convert", we also replace the "convert" | |
292 | ;; in the message 'The version of convert is too old, don't | |
1e5c056c | 293 | ;; expect good results :('. This should not happen, but in |
9016dbc2 | 294 | ;; practice this error message should not affect us. |
295 | (("convert") convert)) | |
296 | #t))) | |
297 | (replace 'build | |
298 | (lambda _ | |
1e5c056c TGR |
299 | (let* ((out (assoc-ref %outputs "out")) |
300 | (man (string-append out "/share/man/man1"))) | |
301 | (zero? (system* "cmake" | |
302 | (string-append "-DCMAKE_INSTALL_PREFIX=" out) | |
303 | (string-append "-DMAN_OUTPUT_PATH=" man) | |
304 | ".")) | |
305 | (zero? (system* "make"))))) | |
9016dbc2 | 306 | (add-before 'install 'install-script |
307 | (lambda* (#:key outputs #:allow-other-keys) | |
1e5c056c | 308 | ;; The bash script lacks an file extension. We have to rename |
9016dbc2 | 309 | ;; it so that the C program and the bash script can be happy |
310 | ;; side by side. | |
311 | (let* ((out (assoc-ref outputs "out")) | |
312 | (bin (string-append out "/bin"))) | |
313 | (install-file "catimg" bin) | |
314 | (rename-file (string-append bin "/catimg") | |
315 | (string-append bin "/catimg.sh")) | |
316 | #t)))))) | |
317 | (inputs | |
1e5c056c | 318 | `(("imagemagick" ,imagemagick))) ; for the bash script version |
9016dbc2 | 319 | (home-page "https://github.com/posva/catimg") |
320 | (synopsis "Render images in the terminal") | |
321 | (description | |
322 | "Catimg is a little program that prints images in the terminal. | |
323 | It supports JPEG, PNG and GIF formats.") | |
324 | (license license:expat))) | |
e79bfa18 LC |
325 | |
326 | (define-public luminance-hdr | |
327 | (package | |
328 | (name "luminance-hdr") | |
329 | (version "2.4.0") | |
330 | (source (origin | |
331 | (method url-fetch) | |
332 | (uri (string-append | |
333 | "mirror://sourceforge/qtpfsgui/luminance/" | |
334 | version "/luminance-hdr-" version ".tar.bz2")) | |
335 | (sha256 | |
336 | (base32 | |
337 | "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l")) | |
338 | (patches (search-patches "luminance-hdr-qt-printer.patch")))) | |
339 | (build-system cmake-build-system) | |
340 | (native-inputs | |
341 | `(("pkg-config" ,pkg-config) | |
342 | ("qttools" ,qttools))) | |
343 | (inputs | |
344 | `(("qtbase" ,qtbase) | |
345 | ("qtdeclarative" ,qtdeclarative) | |
346 | ("qtwebkit" ,qtwebkit) | |
347 | ("boost" ,boost) | |
348 | ;; ("gtest" ,gtest) | |
349 | ("libraw" ,libraw) | |
350 | ("zlib" ,zlib) | |
351 | ("exiv2" ,exiv2) | |
352 | ("libpng" ,libpng) | |
353 | ("libjpeg" ,libjpeg) | |
354 | ("lcms" ,lcms) | |
355 | ("openexr" ,openexr) | |
356 | ("fftw" ,fftwf) | |
357 | ("gsl" ,gsl) | |
358 | ("libtiff" ,libtiff))) | |
359 | (arguments | |
360 | '(#:phases | |
361 | (modify-phases %standard-phases | |
362 | (add-after 'set-paths 'add-ilmbase-include-path | |
363 | (lambda* (#:key inputs #:allow-other-keys) | |
364 | ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does | |
365 | ;; not use 'OpenEXR.pc'. Thus, we need to add | |
366 | ;; "$ilmbase/include/OpenEXR/" to the CPATH. | |
367 | (setenv "CPATH" | |
368 | (string-append (assoc-ref inputs "ilmbase") | |
369 | "/include/OpenEXR" | |
370 | ":" (or (getenv "CPATH") ""))) | |
371 | #t))))) | |
372 | (home-page "http://qtpfsgui.sourceforge.net") | |
373 | (synopsis "High dynamic range (HDR) imaging application") | |
374 | (description | |
375 | "Luminance HDR (formerly QtPFSGui) is a graphical user interface | |
376 | application that aims to provide a workflow for high dynamic range (HDR) | |
377 | imaging. It supports several HDR and LDR image formats, and it can: | |
378 | ||
379 | @itemize | |
380 | @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and | |
381 | 16bit, RAW) of the same scene taken at different exposure setting; | |
382 | @item Save load HDR images; | |
383 | @item Rotate, resize and crop HDR images; | |
384 | @item Tone-map HDR images; | |
385 | @item Copy EXIF data between sets of images. | |
386 | @end itemize\n") | |
387 | (license license:gpl2+))) | |
4ee81d37 | 388 | |
389 | ;; CBR and RAR are currently unsupported, due to non-free dependencies. | |
390 | ;; For optional PDF support, you can install the mupdf package. | |
391 | (define-public mcomix | |
392 | (package | |
393 | (name "mcomix") | |
394 | (version "1.2.1") | |
395 | (source | |
396 | (origin | |
397 | (method url-fetch) | |
398 | (uri (string-append "mirror://sourceforge/mcomix/MComix-" version | |
399 | "/mcomix-" version ".tar.bz2")) | |
400 | (sha256 | |
401 | (base32 | |
402 | "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy")))) | |
403 | (build-system python-build-system) | |
404 | (inputs | |
405 | `(("p7zip" ,p7zip) | |
406 | ("python2-pillow" ,python2-pillow) | |
407 | ("python2-pygtk" ,python2-pygtk))) | |
408 | (arguments | |
409 | ;; Python 2.5 or newer (Python 3 and up is not supported) | |
410 | `(#:python ,python-2 | |
411 | #:phases | |
412 | (modify-phases %standard-phases | |
413 | (add-after 'unpack 'configure | |
414 | (lambda* (#:key inputs #:allow-other-keys) | |
415 | (let ((p7zip (assoc-ref inputs "p7zip"))) | |
416 | ;; insert absolute path to 7z executable | |
417 | (substitute* "mcomix/archive/sevenzip_external.py" | |
418 | (("_7z_executable = -1") | |
419 | (string-append "_7z_executable = u'" p7zip "/bin/7z'")))) | |
420 | #t))))) | |
421 | (home-page "https://sourceforge.net/p/mcomix/wiki/Home/") | |
422 | (synopsis "Image viewer for comics") | |
423 | (description "MComix is a customizable image viewer that specializes as | |
424 | a comic and manga reader. It supports a variety of container formats | |
425 | including CBZ, CB7, CBT, LHA.") | |
426 | (license license:gpl2+))) |