Commit | Line | Data |
---|---|---|
d1a5b200 | 1 | ;;; GNU Guix --- Functional package management for GNU |
51c87770 | 2 | ;;; Copyright © 2013, 2017, 2018, 2019, 2020 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> | |
d67a3beb | 5 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
f7e9f1ca | 6 | ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com> |
3c986a7d | 7 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
ed3a9ec5 | 8 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
4ee81d37 | 9 | ;;; Copyright © 2017 nee <nee-git@hidamari.blue> |
6420cab3 | 10 | ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
027f97b1 | 11 | ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
87036462 | 12 | ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
a0570377 | 13 | ;;; Copyright © 2019, 2020 Guy Fleury Iteriteka <gfleury@disroot.org> |
9943d238 | 14 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
cd819b45 | 15 | ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net> |
e2bd0af3 | 16 | ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in> |
e5afc63b | 17 | ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> |
eb55f018 | 18 | ;;; |
d1a5b200 AK |
19 | ;;; This file is part of GNU Guix. |
20 | ;;; | |
eb55f018 EF |
21 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
22 | ;;; under the terms of the GNU General Public License as published by | |
23 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
24 | ;;; your option) any later version. | |
25 | ;;; | |
26 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
27 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
28 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | ;;; GNU General Public License for more details. | |
30 | ;;; | |
31 | ;;; You should have received a copy of the GNU General Public License | |
32 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
33 | ||
34 | (define-module (gnu packages image-viewers) | |
35 | #:use-module ((guix licenses) #:prefix license:) | |
36 | #:use-module (guix download) | |
92f08e14 | 37 | #:use-module (guix git-download) |
eb55f018 | 38 | #:use-module (guix packages) |
e5afc63b | 39 | #:use-module (guix utils) |
eb55f018 | 40 | #:use-module (guix build-system gnu) |
9016dbc2 | 41 | #:use-module (guix build-system cmake) |
307cdd66 | 42 | #:use-module (guix build-system meson) |
4ee81d37 | 43 | #:use-module (guix build-system python) |
eb55f018 | 44 | #:use-module (gnu packages autotools) |
e79bfa18 | 45 | #:use-module (gnu packages algebra) |
e79bfa18 | 46 | #:use-module (gnu packages boost) |
cd819b45 | 47 | #:use-module (gnu packages check) |
e79bfa18 | 48 | #:use-module (gnu packages compression) |
d1a5b200 | 49 | #:use-module (gnu packages curl) |
cd819b45 | 50 | #:use-module (gnu packages documentation) |
6c162d0e | 51 | #:use-module (gnu packages fontutils) |
cd819b45 | 52 | #:use-module (gnu packages freedesktop) |
307cdd66 | 53 | #:use-module (gnu packages gettext) |
d1a5b200 | 54 | #:use-module (gnu packages ghostscript) |
cd819b45 | 55 | #:use-module (gnu packages gl) |
eb55f018 EF |
56 | #:use-module (gnu packages glib) |
57 | #:use-module (gnu packages gnome) | |
58 | #:use-module (gnu packages gtk) | |
e79bfa18 | 59 | #:use-module (gnu packages graphics) |
023f0fb0 | 60 | #:use-module (gnu packages image) |
9016dbc2 | 61 | #:use-module (gnu packages imagemagick) |
e79bfa18 | 62 | #:use-module (gnu packages maths) |
83a7a88f | 63 | #:use-module (gnu packages perl) |
5ccde207 | 64 | #:use-module (gnu packages perl-check) |
d1a5b200 AK |
65 | #:use-module (gnu packages photo) |
66 | #:use-module (gnu packages pkg-config) | |
4ee81d37 | 67 | #:use-module (gnu packages python) |
44d10b1f | 68 | #:use-module (gnu packages python-xyz) |
e79bfa18 | 69 | #:use-module (gnu packages qt) |
cd819b45 | 70 | #:use-module (gnu packages xdisorg) |
e79bfa18 LC |
71 | #:use-module (gnu packages xorg) |
72 | #:use-module (gnu packages)) | |
d1a5b200 AK |
73 | |
74 | (define-public feh | |
75 | (package | |
76 | (name "feh") | |
5044a6eb | 77 | (version "3.5") |
d1a5b200 AK |
78 | (home-page "https://feh.finalrewind.org/") |
79 | (source (origin | |
80 | (method url-fetch) | |
81 | (uri (string-append home-page | |
82 | name "-" version ".tar.bz2")) | |
83 | (sha256 | |
84 | (base32 | |
5044a6eb | 85 | "07jklibpi4ig9pbdrwhllsfffxn2h8xf4ma36qii00w4hb69v3rq")))) |
d1a5b200 AK |
86 | (build-system gnu-build-system) |
87 | (arguments | |
dc1d3cde | 88 | '(#:phases (modify-phases %standard-phases (delete 'configure)) |
83a7a88f | 89 | #:test-target "test" |
dc1d3cde | 90 | #:make-flags |
0de33cb3 | 91 | (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")) |
123612d3 TGR |
92 | "exif=1" |
93 | "inotify=1"))) | |
83a7a88f MB |
94 | (native-inputs |
95 | `(("perl" ,perl) | |
96 | ("perl-test-command" ,perl-test-command))) | |
d1a5b200 AK |
97 | (inputs `(("imlib2" ,imlib2) |
98 | ("curl" ,curl) | |
0de33cb3 | 99 | ("libexif" ,libexif) |
d1a5b200 AK |
100 | ("libpng" ,libpng) |
101 | ("libxt" ,libxt) | |
102 | ("libx11" ,libx11) | |
103 | ("libxinerama" ,libxinerama))) | |
3c41b992 MB |
104 | (native-search-paths |
105 | ;; Feh allows overriding the libcurl builtin CA path (unset in Guix) | |
106 | ;; with the same variable as the `curl` command line HTTP tool. | |
dc138d6d | 107 | (package-native-search-paths curl)) |
d1a5b200 AK |
108 | (synopsis "Fast and light imlib2-based image viewer") |
109 | (description | |
110 | "feh is an X11 image viewer aimed mostly at console users. | |
111 | Unlike most other viewers, it does not have a fancy GUI, but simply | |
112 | displays images. It can also be used to set the desktop wallpaper. | |
113 | It is controlled via commandline arguments and configurable key/mouse | |
114 | actions.") | |
115 | ||
116 | ;; The license is really the Expat license, with additional wording in the | |
117 | ;; 2nd paragraph: "acknowledgment shall be given in the documentation and | |
118 | ;; software packages that this Software was used." | |
119 | (license (license:x11-style | |
120 | "file://COPYING" | |
121 | "See 'COPYING' in the distribution.")))) | |
122 | ||
123 | (define-public geeqie | |
e3e757ed LC |
124 | (package |
125 | (name "geeqie") | |
126 | (version "1.5") | |
127 | (source (origin | |
128 | (method git-fetch) | |
129 | (uri (git-reference | |
130 | (url "https://github.com/BestImageViewer/geeqie") | |
131 | (commit (string-append "v" version)))) | |
132 | (sha256 | |
133 | (base32 | |
134 | "0nf45sh3pwsv98sppcrqj81b6mdi31n1sbc7gn88m8mhpfp1qq6k")) | |
135 | (file-name (git-file-name name version)))) | |
136 | (build-system gnu-build-system) | |
137 | (arguments | |
138 | `( ;; Enable support for a "map" pane using GPS data. | |
139 | #:configure-flags '("--enable-map" | |
140 | "--enable-gtk3"))) | |
141 | (inputs | |
142 | `(("clutter" ,clutter) | |
143 | ("libchamplain" ,libchamplain) | |
144 | ("lcms" ,lcms) | |
145 | ("exiv2" ,exiv2) | |
146 | ("libpng" ,libpng) | |
147 | ("gtk+" ,gtk+))) | |
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 | |
d1a5b200 AK |
158 | systems. It features: EXIF, IPTC and XMP metadata browsing and editing |
159 | interoperability; easy integration with other software; geeqie works on files | |
160 | and directories, there is no need to import images; fast preview for many raw | |
161 | image formats; tools for image comparison, sorting and managing photo | |
162 | collection. Geeqie was initially based on GQview.") | |
e3e757ed | 163 | (license license:gpl2+))) |
d1a5b200 | 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) | |
4bd428a7 | 179 | ("libjpeg" ,libjpeg-turbo))) |
ed3a9ec5 MO |
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. | |
184 | It 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") | |
6420cab3 | 191 | (version "26") |
d1a5b200 | 192 | (source (origin |
92f08e14 RW |
193 | (method git-fetch) |
194 | (uri (git-reference | |
b0e7b699 | 195 | (url "https://github.com/muennich/sxiv") |
92f08e14 RW |
196 | (commit (string-append "v" version)))) |
197 | (file-name (git-file-name name version)) | |
d1a5b200 AK |
198 | (sha256 |
199 | (base32 | |
6420cab3 | 200 | "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f")))) |
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" | |
6420cab3 TGR |
207 | ;; Xft.h #includes <ft2build.h> without ‘freetype2/’. The Makefile |
208 | ;; works around this by hard-coding /usr/include & $PREFIX. | |
56d2007e | 209 | (string-append "CPPFLAGS=-I" |
6c162d0e TGR |
210 | (assoc-ref %build-inputs "freetype") |
211 | "/include/freetype2") | |
212 | "V=1") | |
213 | #:phases | |
214 | (modify-phases %standard-phases | |
d67a3beb EF |
215 | (delete 'configure) ; no configure script |
216 | (add-after 'install 'install-desktop-file | |
217 | (lambda* (#:key outputs #:allow-other-keys) | |
218 | (install-file "sxiv.desktop" | |
219 | (string-append (assoc-ref outputs "out") | |
220 | "/share/applications")) | |
221 | #t))))) | |
d1a5b200 | 222 | (inputs |
6c162d0e | 223 | `(("freetype" ,freetype) |
d1a5b200 | 224 | ("giflib" ,giflib) |
6c162d0e TGR |
225 | ("imlib2" ,imlib2) |
226 | ("libexif" ,libexif) | |
227 | ("libx11" ,libx11) | |
228 | ("libxft" ,libxft))) | |
d1a5b200 AK |
229 | (home-page "https://github.com/muennich/sxiv") |
230 | (synopsis "Simple X Image Viewer") | |
231 | (description | |
232 | "sxiv is an alternative to feh and qiv. Its primary goal is to | |
233 | provide the most basic features required for fast image viewing. It has | |
234 | vi key bindings and works nicely with tiling window managers. Its code | |
235 | base should be kept small and clean to make it easy for you to dig into | |
236 | it and customize it for your needs.") | |
237 | (license license:gpl2+))) | |
eb55f018 EF |
238 | |
239 | (define-public viewnior | |
240 | (package | |
241 | (name "viewnior") | |
307cdd66 | 242 | (version "1.7") |
eb55f018 EF |
243 | (source |
244 | (origin | |
83541fb6 EF |
245 | (method git-fetch) |
246 | (uri (git-reference | |
b0e7b699 | 247 | (url "https://github.com/hellosiyan/Viewnior") |
83541fb6 EF |
248 | (commit (string-append name "-" version)))) |
249 | (file-name (git-file-name name version)) | |
eb55f018 EF |
250 | (sha256 |
251 | (base32 | |
83541fb6 | 252 | "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig")))) |
307cdd66 | 253 | (build-system meson-build-system) |
eb55f018 EF |
254 | (arguments |
255 | '(#:phases | |
256 | (modify-phases %standard-phases | |
307cdd66 | 257 | (add-after 'unpack 'patch-source |
ea77385c EF |
258 | (lambda _ |
259 | ;; Don't create 'icon-theme.cache' | |
307cdd66 EF |
260 | (substitute* "meson.build" |
261 | (("meson.add_install_script*") "")) | |
262 | #t))) | |
263 | #:tests? #f)) ; no tests | |
eb55f018 | 264 | (native-inputs |
307cdd66 | 265 | `(("gettext" ,gettext-minimal) |
eb55f018 | 266 | ("glib" ,glib "bin") ; glib-genmarshal |
eb55f018 | 267 | ("pkg-config" ,pkg-config) |
307cdd66 | 268 | ("shared-mime-info" ,shared-mime-info))) |
eb55f018 EF |
269 | (inputs |
270 | `(("exiv2" ,exiv2) | |
271 | ("gdk-pixbuf" ,gdk-pixbuf) | |
272 | ("gtk+-2" ,gtk+-2))) | |
307cdd66 | 273 | (home-page "http://siyanpanayotov.com/project/viewnior") |
eb55f018 EF |
274 | (synopsis "Simple, fast and elegant image viewer") |
275 | (description "Viewnior is an image viewer program. Created to be simple, | |
276 | fast and elegant. Its minimalistic interface provides more screenspace for | |
277 | your images. Among its features are: | |
278 | @enumerate | |
279 | @item Fullscreen & Slideshow | |
280 | @item Rotate, flip, crop, save, delete images | |
281 | @item Animation support | |
282 | @item Browse only selected images | |
283 | @item Navigation window | |
284 | @item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen) | |
285 | @item Simple interface | |
286 | @item EXIF and IPTC metadata | |
287 | @item Configurable mouse actions | |
288 | @end enumerate\n") | |
289 | (license license:gpl3+))) | |
9016dbc2 | 290 | |
291 | (define-public catimg | |
292 | (package | |
293 | (name "catimg") | |
0e773da0 | 294 | (version "2.6.0") |
9016dbc2 | 295 | (source |
296 | (origin | |
6f6f9267 RW |
297 | (method git-fetch) |
298 | (uri (git-reference | |
b0e7b699 | 299 | (url "https://github.com/posva/catimg") |
cdee738e | 300 | (commit version))) |
6f6f9267 | 301 | (file-name (git-file-name name version)) |
9016dbc2 | 302 | (sha256 |
0e773da0 | 303 | (base32 "0g9ywbgy162wiam9hc3yqpq5q4gyxa8fj4jskr3fdz8z8jjaabzz")))) |
9016dbc2 | 304 | (build-system cmake-build-system) |
305 | (arguments | |
1e5c056c | 306 | `(#:tests? #f ; no tests |
9016dbc2 | 307 | #:phases |
308 | (modify-phases %standard-phases | |
e2f47efe | 309 | (add-after 'unpack 'patch-convert |
9016dbc2 | 310 | (lambda _ |
e2f47efe RW |
311 | (substitute* "catimg" |
312 | ;; By replacing "convert", we also replace the "convert" | |
313 | ;; in the message 'The version of convert is too old, don't | |
314 | ;; expect good results :('. This should not happen, but in | |
315 | ;; practice this error message should not affect us. | |
316 | (("convert") (which "convert"))) | |
317 | #t)) | |
318 | (add-after 'install 'install-script | |
9016dbc2 | 319 | (lambda* (#:key outputs #:allow-other-keys) |
1e5c056c | 320 | ;; The bash script lacks an file extension. We have to rename |
9016dbc2 | 321 | ;; it so that the C program and the bash script can be happy |
322 | ;; side by side. | |
e2f47efe RW |
323 | (copy-file "../source/catimg" |
324 | (string-append (assoc-ref outputs "out") | |
325 | "/bin/catimg.sh")) | |
326 | #t))))) | |
9016dbc2 | 327 | (inputs |
1e5c056c | 328 | `(("imagemagick" ,imagemagick))) ; for the bash script version |
9016dbc2 | 329 | (home-page "https://github.com/posva/catimg") |
330 | (synopsis "Render images in the terminal") | |
331 | (description | |
332 | "Catimg is a little program that prints images in the terminal. | |
333 | It supports JPEG, PNG and GIF formats.") | |
334 | (license license:expat))) | |
e79bfa18 LC |
335 | |
336 | (define-public luminance-hdr | |
337 | (package | |
338 | (name "luminance-hdr") | |
beb7a281 | 339 | (version "2.6.0") |
e79bfa18 LC |
340 | (source (origin |
341 | (method url-fetch) | |
342 | (uri (string-append | |
343 | "mirror://sourceforge/qtpfsgui/luminance/" | |
344 | version "/luminance-hdr-" version ".tar.bz2")) | |
345 | (sha256 | |
346 | (base32 | |
beb7a281 | 347 | "188q0l63nfasqfvwbq4mwx2vh7wsfi2bq9n5nksddspl1qz01lnp")))) |
e79bfa18 LC |
348 | (build-system cmake-build-system) |
349 | (native-inputs | |
350 | `(("pkg-config" ,pkg-config) | |
351 | ("qttools" ,qttools))) | |
352 | (inputs | |
353 | `(("qtbase" ,qtbase) | |
354 | ("qtdeclarative" ,qtdeclarative) | |
beb7a281 | 355 | ("qtsvg" ,qtsvg) |
e79bfa18 LC |
356 | ("qtwebkit" ,qtwebkit) |
357 | ("boost" ,boost) | |
beb7a281 | 358 | ("eigen" ,eigen) |
e79bfa18 LC |
359 | ;; ("gtest" ,gtest) |
360 | ("libraw" ,libraw) | |
361 | ("zlib" ,zlib) | |
362 | ("exiv2" ,exiv2) | |
363 | ("libpng" ,libpng) | |
4bd428a7 | 364 | ("libjpeg" ,libjpeg-turbo) |
e79bfa18 LC |
365 | ("lcms" ,lcms) |
366 | ("openexr" ,openexr) | |
367 | ("fftw" ,fftwf) | |
368 | ("gsl" ,gsl) | |
369 | ("libtiff" ,libtiff))) | |
370 | (arguments | |
beb7a281 MB |
371 | '(#:tests? #f ;XXX: some tests fail to compile |
372 | #:phases | |
e79bfa18 LC |
373 | (modify-phases %standard-phases |
374 | (add-after 'set-paths 'add-ilmbase-include-path | |
375 | (lambda* (#:key inputs #:allow-other-keys) | |
376 | ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does | |
377 | ;; not use 'OpenEXR.pc'. Thus, we need to add | |
378 | ;; "$ilmbase/include/OpenEXR/" to the CPATH. | |
379 | (setenv "CPATH" | |
380 | (string-append (assoc-ref inputs "ilmbase") | |
381 | "/include/OpenEXR" | |
382 | ":" (or (getenv "CPATH") ""))) | |
383 | #t))))) | |
384 | (home-page "http://qtpfsgui.sourceforge.net") | |
385 | (synopsis "High dynamic range (HDR) imaging application") | |
386 | (description | |
387 | "Luminance HDR (formerly QtPFSGui) is a graphical user interface | |
388 | application that aims to provide a workflow for high dynamic range (HDR) | |
389 | imaging. It supports several HDR and LDR image formats, and it can: | |
390 | ||
391 | @itemize | |
392 | @item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and | |
393 | 16bit, RAW) of the same scene taken at different exposure setting; | |
394 | @item Save load HDR images; | |
395 | @item Rotate, resize and crop HDR images; | |
396 | @item Tone-map HDR images; | |
397 | @item Copy EXIF data between sets of images. | |
398 | @end itemize\n") | |
399 | (license license:gpl2+))) | |
4ee81d37 | 400 | |
401 | ;; CBR and RAR are currently unsupported, due to non-free dependencies. | |
4ee81d37 | 402 | (define-public mcomix |
e5afc63b PN |
403 | ;; Official mcomix hasn't been updated since 2016, it's broken with |
404 | ;; python-pillow 6+ and only supports Python 2. We use fork instead. | |
405 | (let ((commit "fea55a7a9369569eefed72209eed830409c4af98")) | |
406 | (package | |
407 | (name "mcomix") | |
408 | (version (git-version "1.2.1" "1" commit)) | |
409 | (source | |
410 | (origin | |
411 | (method git-fetch) | |
412 | (uri (git-reference | |
413 | (url "https://github.com/multiSnow/mcomix3") | |
414 | (commit commit))) | |
415 | (file-name (git-file-name name version)) | |
416 | (sha256 | |
417 | (base32 | |
418 | "05zl0dkjwbdcm2zlk4nz9w33amlqj8pbf32a8ymshc2356fqhhi5")))) | |
419 | (build-system python-build-system) | |
420 | (inputs | |
421 | `(("p7zip" ,p7zip) | |
422 | ("python-pillow" ,python-pillow) | |
423 | ("python-pygobject" ,python-pygobject) | |
424 | ("python-pycairo" ,python-pycairo))) | |
425 | (arguments | |
426 | `(#:tests? #f ; FIXME: How do we run tests? | |
427 | #:phases | |
428 | (modify-phases %standard-phases | |
429 | (add-after 'unpack 'configure | |
430 | (lambda* (#:key inputs #:allow-other-keys) | |
431 | (let ((p7zip (assoc-ref inputs "p7zip"))) | |
432 | ;; insert absolute path to 7z executable | |
433 | (substitute* "mcomix/mcomix/archive/sevenzip_external.py" | |
434 | (("_7z_executable = -1") | |
435 | (string-append "_7z_executable = u'" p7zip "/bin/7z'")))) | |
436 | #t)) | |
437 | (replace 'build | |
438 | (lambda* (#:key outputs #:allow-other-keys) | |
439 | (let* ((out (assoc-ref outputs "out")) | |
440 | (pyver ,(version-major+minor (package-version python))) | |
441 | (lib (string-append out "/lib/python" pyver))) | |
442 | (invoke (which "python") "installer.py" "--srcdir=mcomix" | |
443 | (string-append "--target=" lib)) | |
444 | (rename-file (string-append lib "/mcomix") | |
445 | (string-append lib "/site-packages")) | |
446 | #t))) | |
447 | (replace 'install | |
448 | (lambda* (#:key outputs #:allow-other-keys) | |
449 | (let* ((out (assoc-ref outputs "out")) | |
450 | (share (string-append out "/share")) | |
451 | (bin (string-append out "/bin")) | |
452 | (pyver ,(version-major+minor (package-version python))) | |
453 | (lib (string-append out "/lib/python" pyver "/site-packages"))) | |
454 | (mkdir-p bin) | |
455 | (rename-file (string-append lib "/mcomixstarter.py") | |
456 | (string-append bin "/mcomix")) | |
457 | (rename-file (string-append lib "/comicthumb.py") | |
458 | (string-append bin "/comicthumb")) | |
459 | (install-file "mime/mcomix.desktop" | |
460 | (string-append share "/applications")) | |
461 | (install-file "mime/mcomix.appdata.xml" | |
462 | (string-append share "/metainfo")) | |
463 | (install-file "mime/mcomix.xml" | |
464 | (string-append share "/mime/packages")) | |
465 | (install-file "mime/comicthumb.thumbnailer" | |
466 | (string-append share "/thumbnailers")) | |
467 | (install-file "man/mcomix.1" (string-append share "/man/man1")) | |
468 | (install-file "man/comicthumb.1" (string-append share "/man/man1")) | |
469 | (for-each | |
470 | (lambda (size) | |
471 | (install-file | |
472 | (format #f "mcomix/mcomix/images/~sx~s/mcomix.png" size size) | |
473 | (format #f "~a/icons/hicolor/~sx~s/apps/" share size size)) | |
474 | (for-each | |
475 | (lambda (ext) | |
476 | (install-file | |
477 | (format #f "mime/icons/~sx~s/application-x-~a.png" size size ext) | |
478 | (format #f "~a/icons/hicolor/~sx~s/mimetypes/" | |
479 | share size size))) | |
480 | '("cb7" "cbr" "cbt" "cbz"))) | |
481 | '(16 22 24 32 48)) | |
482 | #t)))))) | |
483 | (home-page "https://sourceforge.net/p/mcomix/wiki/Home/") | |
484 | (synopsis "Image viewer for comics") | |
485 | (description "MComix is a customizable image viewer that specializes as | |
4ee81d37 | 486 | a comic and manga reader. It supports a variety of container formats |
e5afc63b PN |
487 | including CBZ, CB7, CBT, LHA. |
488 | ||
489 | For PDF support, install the @emph{mupdf} package.") | |
490 | (license license:gpl2+)))) | |
87036462 NG |
491 | |
492 | (define-public qview | |
493 | (package | |
494 | (name "qview") | |
4f620bbf NG |
495 | (version "3.0") |
496 | (source | |
497 | (origin | |
498 | (method git-fetch) | |
499 | (uri (git-reference | |
b0e7b699 | 500 | (url "https://github.com/jurplel/qView") |
4f620bbf NG |
501 | (commit version))) |
502 | (file-name (git-file-name name version)) | |
503 | (sha256 | |
504 | (base32 "15a91bs3wcqhgf76wzigbn10hayg628j84pq4j2vaxar94ak0vk7")))) | |
87036462 NG |
505 | (build-system gnu-build-system) |
506 | (arguments | |
507 | `(#:phases | |
508 | (modify-phases %standard-phases | |
509 | (replace 'configure | |
510 | (lambda _ | |
511 | (invoke "qmake"))) | |
512 | ;; Installation process hard-codes "/usr/bin", possibly | |
513 | ;; prefixed. | |
514 | (add-after 'configure 'fix-install-directory | |
515 | (lambda* (#:key outputs #:allow-other-keys) | |
516 | (let ((out (assoc-ref outputs "out"))) | |
517 | (substitute* "Makefile" | |
518 | (("\\$\\(INSTALL_ROOT\\)/usr") out)) | |
519 | #t))) | |
520 | ;; Don't phone home or show "Checking for updates..." in the | |
521 | ;; About menu. | |
522 | (add-before 'build 'disable-auto-update | |
523 | (lambda _ | |
524 | (substitute* "src/qvaboutdialog.cpp" | |
525 | (("ui->updateLabel->setText\\(updateText\\);") "") | |
526 | (("requestUpdates\\(\\);") "")) | |
527 | #t))))) | |
528 | (inputs | |
529 | `(("qtbase" ,qtbase) | |
530 | ("qtsvg" ,qtsvg) | |
531 | ("qtimageformats" ,qtimageformats))) | |
532 | (home-page "https://interversehq.com/qview/") | |
533 | (synopsis "Convenient and minimal image viewer") | |
534 | (description "qView is a Qt image viewer designed with visually | |
535 | minimalism and usability in mind. Its features include animated GIF | |
536 | controls, file history, rotation/mirroring, and multithreaded | |
537 | preloading.") | |
538 | (license license:gpl3+))) | |
52bb05c7 | 539 | |
540 | (define-public chafa | |
541 | (package | |
542 | (name "chafa") | |
a0570377 | 543 | (version "1.4.1") |
52bb05c7 | 544 | (source (origin |
545 | (method url-fetch) | |
546 | (uri (string-append "https://hpjansson.org/chafa/releases/chafa-" | |
547 | version ".tar.xz")) | |
548 | (sha256 | |
549 | (base32 | |
a0570377 | 550 | "18rb82bfqj1sj2g4irazx4lwq9q4b4k7my1r0q714vf9yhs41ls6")))) |
52bb05c7 | 551 | (build-system gnu-build-system) |
552 | (native-inputs | |
553 | `(("pkg-config" ,pkg-config))) | |
554 | (inputs | |
a0570377 | 555 | `(("freetype" ,freetype) |
556 | ("libjpeg" ,libjpeg-turbo) | |
557 | ("glib" ,glib) | |
52bb05c7 | 558 | ("imagemagick" ,imagemagick))) |
559 | (synopsis "Convert images to ANSI/Unicode characters") | |
560 | (description | |
561 | "Chafa is a command-line utility that converts all kinds of images, | |
562 | including animated GIFs, into ANSI/Unicode character output that can be | |
563 | displayed in a terminal.") | |
564 | (home-page "https://hpjansson.org/chafa/") | |
565 | (license license:lgpl3+))) | |
cd819b45 PMY |
566 | |
567 | (define-public imv | |
568 | (package | |
569 | (name "imv") | |
570 | (version "4.1.0") | |
571 | (source (origin | |
572 | (method git-fetch) | |
573 | (uri (git-reference | |
574 | (url "https://github.com/eXeC64/imv") | |
575 | (commit (string-append "v" version)))) | |
576 | (sha256 | |
577 | (base32 | |
578 | "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx")) | |
579 | (file-name (git-file-name name version)))) | |
580 | (build-system gnu-build-system) | |
581 | (arguments | |
582 | '(#:phases | |
583 | (modify-phases %standard-phases | |
51c87770 LC |
584 | (delete 'configure) |
585 | (add-after 'install 'record-absolute-file-names | |
586 | (lambda* (#:key outputs #:allow-other-keys) | |
587 | ;; 'imv' is a script that execs 'imv-x11' or 'imv-wayland'. | |
588 | ;; Record their absolute file name. | |
589 | (let* ((out (assoc-ref outputs "out")) | |
590 | (bin (string-append out "/bin"))) | |
591 | (substitute* (string-append bin "/imv") | |
592 | (("imv-") | |
593 | (string-append bin "/imv-"))) | |
594 | #t)))) | |
cd819b45 PMY |
595 | #:make-flags |
596 | (list "CC=gcc" | |
597 | (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
598 | (string-append "CONFIGPREFIX=" | |
599 | (assoc-ref %outputs "out") "/etc")))) | |
600 | (inputs | |
601 | `(("asciidoc" ,asciidoc) | |
602 | ("freeimage" ,freeimage) | |
603 | ("glu" ,glu) | |
604 | ("librsvg" ,librsvg) | |
605 | ("libxkbcommon" ,libxkbcommon) | |
606 | ("pango" ,pango) | |
607 | ("wayland" ,wayland))) | |
608 | (native-inputs | |
609 | `(("cmocka" ,cmocka) | |
610 | ("pkg-config" ,pkg-config))) | |
611 | (synopsis "Image viewer for tiling window managers") | |
612 | (description "@code{imv} is a command line image viewer intended for use | |
613 | with tiling window managers. Features include: | |
614 | ||
615 | @itemize | |
616 | @item Native Wayland and X11 support. | |
617 | @item Support for dozens of image formats including: | |
618 | @itemize | |
619 | @item PNG | |
620 | @item JPEG | |
621 | @item Animated GIFs | |
622 | @item SVG | |
623 | @item TIFF | |
624 | @item Various RAW formats | |
625 | @item Photoshop PSD files | |
626 | @end itemize | |
627 | @item Configurable key bindings and behavior. | |
628 | @item Highly scriptable with IPC via imv-msg. | |
629 | @end itemize\n") | |
630 | (home-page "https://github.com/eXeC64/imv") | |
631 | (license license:expat))) | |
e2bd0af3 VK |
632 | |
633 | (define-public qiv | |
634 | (package | |
635 | (name "qiv") | |
636 | (version "2.3.1") | |
637 | (source | |
638 | (origin | |
639 | (method url-fetch) | |
640 | (uri (string-append "http://spiegl.de/qiv/download/qiv-" | |
641 | version ".tgz")) | |
642 | (sha256 | |
643 | (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7")))) | |
644 | (build-system gnu-build-system) | |
645 | (native-inputs | |
646 | `(("pkg-config" ,pkg-config) | |
647 | ;; That is required for testing. | |
648 | ("xorg-server" ,xorg-server-for-tests))) | |
649 | (inputs | |
650 | `(("imlib2" ,imlib2) | |
651 | ("glib" ,glib) | |
652 | ("gtk+" ,gtk+-2) | |
653 | ("lcms" ,lcms) | |
27783023 | 654 | ("libjpeg" ,libjpeg-turbo) |
e2bd0af3 VK |
655 | ("libtiff" ,libtiff) |
656 | ("libexif" ,libexif) | |
657 | ("libx11" ,libx11) | |
658 | ("libxext" ,libxext))) | |
659 | (arguments | |
660 | `(#:phases | |
661 | (modify-phases %standard-phases | |
662 | (delete 'configure) ; no configure script | |
663 | (add-before 'install 'patch-file-start-xserver | |
664 | (lambda* (#:key inputs #:allow-other-keys) | |
665 | ;; patch the file so that qiv runs and exits by itself | |
666 | (substitute* "Makefile" | |
667 | (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg") | |
668 | ;; Fail the build when test fails. | |
669 | (("echo \"-- Test Failed --\"") | |
670 | "(echo \"-- Test Failed --\" ; false)")) | |
671 | ;; There must be a running X server and make install doesn't start one. | |
672 | ;; Therefore we must do it. | |
673 | (system "Xvfb :1 &") | |
674 | (setenv "DISPLAY" ":1") | |
675 | #t))) | |
676 | #:tests? #f ; there is no check target | |
677 | #:make-flags | |
678 | (list | |
679 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
680 | (home-page "http://spiegl.de/qiv/") | |
681 | (synopsis "Graphical image viewer for X") | |
682 | (description | |
683 | "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer. | |
684 | Features include zoom, maxpect, scale down, fullscreen, slideshow, delete, | |
685 | brightness/contrast/gamma correction, pan with keyboard and mouse, flip, | |
686 | rotate left/right, jump/forward/backward images, filename filter and use it | |
687 | to set X desktop background.") | |
688 | (license license:gpl2))) |