1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
7 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
8 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system python)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages graphics)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages imagemagick)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages photo)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages python)
50 #:use-module (gnu packages qt)
51 #:use-module (gnu packages xorg)
52 #:use-module (gnu packages))
58 (home-page "https://feh.finalrewind.org/")
61 (uri (string-append home-page
62 name "-" version ".tar.bz2"))
65 "1sfhr6628xpj9p6bqihdq35y139x2gmrpydjlrwsl1rs77c2bgnf"))))
66 (build-system gnu-build-system)
68 '(#:phases (alist-delete 'configure %standard-phases)
71 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))))
72 (inputs `(("imlib2" ,imlib2)
77 ("libxinerama" ,libxinerama)))
78 (synopsis "Fast and light imlib2-based image viewer")
80 "feh is an X11 image viewer aimed mostly at console users.
81 Unlike most other viewers, it does not have a fancy GUI, but simply
82 displays images. It can also be used to set the desktop wallpaper.
83 It is controlled via commandline arguments and configurable key/mouse
86 ;; The license is really the Expat license, with additional wording in the
87 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
88 ;; software packages that this Software was used."
89 (license (license:x11-style
91 "See 'COPYING' in the distribution."))))
99 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
100 "releases/download/v" version "/geeqie-"
104 "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb"))))
105 (build-system gnu-build-system)
107 `(;; Enable support for a "map" pane using GPS data.
108 #:configure-flags '("--enable-map")
111 (modify-phases %standard-phases
112 (add-after 'unpack 'autogen
114 (setenv "NOCONFIGURE" "true")
115 (zero? (system* "sh" "autogen.sh")))))))
117 `(("clutter" ,clutter)
118 ("libchamplain" ,libchamplain)
124 `(("autoconf" ,autoconf)
125 ("automake" ,automake)
126 ("glib" ,glib "bin") ; glib-gettextize
127 ("intltool" ,intltool)
128 ("pkg-config" ,pkg-config)))
129 (home-page "http://www.geeqie.org/")
130 (synopsis "Lightweight GTK+ based image viewer")
132 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
133 systems. It features: EXIF, IPTC and XMP metadata browsing and editing
134 interoperability; easy integration with other software; geeqie works on files
135 and directories, there is no need to import images; fast preview for many raw
136 image formats; tools for image comparison, sorting and managing photo
137 collection. Geeqie was initially based on GQview.")
138 (license license:gpl2+)))
140 (define-public gpicview
146 (uri (string-append "mirror://sourceforge/lxde/"
147 "GPicView%20%28image%20Viewer%29/0.2.x/"
148 name "-" version ".tar.xz"))
151 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
152 (build-system gnu-build-system)
153 (inputs `(("gtk+" ,gtk+-2)
154 ("libjpeg" ,libjpeg)))
155 (native-inputs `(("intltool" ,intltool)
156 ("pkg-config" ,pkg-config)))
157 (synopsis "Simple and fast image viewer for X")
158 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
159 It is the default image viewer on LXDE desktop environment.")
160 (home-page "http://lxde.sourceforge.net/gpicview/")
161 (license license:gpl2+)))
170 "https://github.com/muennich/sxiv/archive/v"
172 (file-name (string-append name "-" version ".tar.gz"))
175 "0lxnd33gaw4drhdwbkk94wzrjyhh64d57jq2ps7ffmqgizg6hlwz"))))
176 (build-system gnu-build-system)
178 '(#:tests? #f ; no check target
179 #:make-flags (list (string-append "PREFIX=" %output)
181 #:phases (alist-delete
182 'configure ; no configure phase
188 ("libexif" ,libexif)))
189 (home-page "https://github.com/muennich/sxiv")
190 (synopsis "Simple X Image Viewer")
192 "sxiv is an alternative to feh and qiv. Its primary goal is to
193 provide the most basic features required for fast image viewing. It has
194 vi key bindings and works nicely with tiling window managers. Its code
195 base should be kept small and clean to make it easy for you to dig into
196 it and customize it for your needs.")
197 (license license:gpl2+)))
199 (define-public viewnior
206 (uri (string-append "https://github.com/xsisqox/Viewnior/archive/"
207 name "-" version ".tar.gz"))
210 "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9"))))
211 (build-system gnu-build-system)
214 (modify-phases %standard-phases
215 (add-after 'unpack 'autogen
217 (zero? (system* "sh" "autogen.sh")))))))
219 `(("automake" ,automake)
220 ("autoconf" ,autoconf)
221 ("intltool" ,intltool)
222 ("glib" ,glib "bin") ; glib-genmarshal
223 ("gnome-common" ,gnome-common)
225 ("pkg-config" ,pkg-config)
226 ("shared-mime-info" ,shared-mime-info)
230 ("gdk-pixbuf" ,gdk-pixbuf)
232 (home-page "http://siyanpanayotov.com/project/viewnior/")
233 (synopsis "Simple, fast and elegant image viewer")
234 (description "Viewnior is an image viewer program. Created to be simple,
235 fast and elegant. Its minimalistic interface provides more screenspace for
236 your images. Among its features are:
238 @item Fullscreen & Slideshow
239 @item Rotate, flip, crop, save, delete images
240 @item Animation support
241 @item Browse only selected images
242 @item Navigation window
243 @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
244 @item Simple interface
245 @item EXIF and IPTC metadata
246 @item Configurable mouse actions
248 (license license:gpl3+)))
250 (define-public catimg
257 (uri (string-append "https://github.com/posva/catimg/archive"
258 "/v" version ".tar.gz"))
259 (file-name (string-append name "-" version ".tar.gz"))
262 "0n78sl8mxyky9zcih2znzcnb9dbfmvmrdwzj73jcxfh531cgcpi9"))))
263 (build-system cmake-build-system)
265 `(#:tests? #f ; no tests
267 (modify-phases %standard-phases
269 (lambda* (#:key inputs #:allow-other-keys)
270 (let* ((magic (assoc-ref %build-inputs "imagemagick"))
271 (convert (string-append magic "/bin/convert")))
272 (substitute* "catimg"
273 ;; By replacing "convert", we also replace the "convert"
274 ;; in the message 'The version of convert is too old, don't
275 ;; expect good results :('. This should not happen, but in
276 ;; practice this error message should not affect us.
277 (("convert") convert))
281 (let* ((out (assoc-ref %outputs "out"))
282 (man (string-append out "/share/man/man1")))
283 (zero? (system* "cmake"
284 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
285 (string-append "-DMAN_OUTPUT_PATH=" man)
287 (zero? (system* "make")))))
288 (add-before 'install 'install-script
289 (lambda* (#:key outputs #:allow-other-keys)
290 ;; The bash script lacks an file extension. We have to rename
291 ;; it so that the C program and the bash script can be happy
293 (let* ((out (assoc-ref outputs "out"))
294 (bin (string-append out "/bin")))
295 (install-file "catimg" bin)
296 (rename-file (string-append bin "/catimg")
297 (string-append bin "/catimg.sh"))
300 `(("imagemagick" ,imagemagick))) ; for the bash script version
301 (home-page "https://github.com/posva/catimg")
302 (synopsis "Render images in the terminal")
304 "Catimg is a little program that prints images in the terminal.
305 It supports JPEG, PNG and GIF formats.")
306 (license license:expat)))
308 (define-public luminance-hdr
310 (name "luminance-hdr")
315 "mirror://sourceforge/qtpfsgui/luminance/"
316 version "/luminance-hdr-" version ".tar.bz2"))
319 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
320 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
321 (build-system cmake-build-system)
323 `(("pkg-config" ,pkg-config)
324 ("qttools" ,qttools)))
327 ("qtdeclarative" ,qtdeclarative)
328 ("qtwebkit" ,qtwebkit)
340 ("libtiff" ,libtiff)))
343 (modify-phases %standard-phases
344 (add-after 'set-paths 'add-ilmbase-include-path
345 (lambda* (#:key inputs #:allow-other-keys)
346 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
347 ;; not use 'OpenEXR.pc'. Thus, we need to add
348 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
350 (string-append (assoc-ref inputs "ilmbase")
352 ":" (or (getenv "CPATH") "")))
354 (home-page "http://qtpfsgui.sourceforge.net")
355 (synopsis "High dynamic range (HDR) imaging application")
357 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
358 application that aims to provide a workflow for high dynamic range (HDR)
359 imaging. It supports several HDR and LDR image formats, and it can:
362 @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
363 16bit, RAW) of the same scene taken at different exposure setting;
364 @item Save load HDR images;
365 @item Rotate, resize and crop HDR images;
366 @item Tone-map HDR images;
367 @item Copy EXIF data between sets of images.
369 (license license:gpl2+)))
371 ;; CBR and RAR are currently unsupported, due to non-free dependencies.
372 ;; For optional PDF support, you can install the mupdf package.
373 (define-public mcomix
380 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
381 "/mcomix-" version ".tar.bz2"))
384 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
385 (build-system python-build-system)
388 ("python2-pillow" ,python2-pillow)
389 ("python2-pygtk" ,python2-pygtk)))
391 ;; Python 2.5 or newer (Python 3 and up is not supported)
394 (modify-phases %standard-phases
395 (add-after 'unpack 'configure
396 (lambda* (#:key inputs #:allow-other-keys)
397 (let ((p7zip (assoc-ref inputs "p7zip")))
398 ;; insert absolute path to 7z executable
399 (substitute* "mcomix/archive/sevenzip_external.py"
400 (("_7z_executable = -1")
401 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
403 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
404 (synopsis "Image viewer for comics")
405 (description "MComix is a customizable image viewer that specializes as
406 a comic and manga reader. It supports a variety of container formats
407 including CBZ, CB7, CBT, LHA.")
408 (license license:gpl2+)))