gnu: Remove meson-0.59 workarounds.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2015, 2017 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
10 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
11 ;;; Copyright © 2020. 2021 Vinicius Monego <monego@posteo.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
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 photo)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system meson)
32 #:use-module (guix build-system perl)
33 #:use-module (guix build-system python)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix utils)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages boost)
44 #:use-module (gnu packages build-tools)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages cmake)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages file)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages geo)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages graphics)
59 #:use-module (gnu packages gstreamer)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages image-processing)
63 #:use-module (gnu packages imagemagick)
64 #:use-module (gnu packages iso-codes)
65 #:use-module (gnu packages libcanberra)
66 #:use-module (gnu packages libusb)
67 #:use-module (gnu packages llvm)
68 #:use-module (gnu packages lua)
69 #:use-module (gnu packages man)
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages opencl)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages popt)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages python-web)
78 #:use-module (gnu packages qt)
79 #:use-module (gnu packages readline)
80 #:use-module (gnu packages ruby)
81 #:use-module (gnu packages sqlite)
82 #:use-module (gnu packages tex)
83 #:use-module (gnu packages time)
84 #:use-module (gnu packages video)
85 #:use-module (gnu packages web)
86 #:use-module (gnu packages wxwidgets)
87 #:use-module (gnu packages xfig)
88 #:use-module (gnu packages xorg)
89 #:use-module (gnu packages xml)
90 #:use-module ((srfi srfi-1) #:hide (zip))
91 #:use-module (srfi srfi-26))
92
93 (define-public rapid-photo-downloader
94 (package
95 (name "rapid-photo-downloader")
96 (version "0.9.18")
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "https://launchpad.net/rapid/pyqt/"
100 version "/+download/" name "-"
101 version ".tar.gz"))
102 (sha256
103 (base32
104 "15p7sssg6vmqbm5xnc4j5dr89d7gl7y5qyq44a240yl5aqkjnybw"))))
105 (build-system python-build-system)
106 (native-inputs
107 (list file intltool gobject-introspection))
108 (inputs
109 `(("gdk-pixbuf" ,gdk-pixbuf)
110 ("gexiv2" ,gexiv2)
111 ("gst-libav" ,gst-libav)
112 ("gst-plugins-base" ,gst-plugins-base)
113 ("gst-plugins-good" ,gst-plugins-good)
114 ("gstreamer" ,gstreamer)
115 ("libgudev" ,libgudev)
116 ("libnotify" ,libnotify)
117 ("libmediainfo" ,libmediainfo)
118 ("usdisks" ,udisks)
119 ("python-pyqt" ,python-pyqt)
120 ("python-pygobject" ,python-pygobject)
121 ("python-gphoto2" ,python-gphoto2)
122 ("python-pyzmq" ,python-pyzmq)
123 ("python-tornado" ,python-tornado)
124 ("python-psutil" ,python-psutil)
125 ("python-pyxdg" ,python-pyxdg)
126 ("python-arrow" ,python-arrow)
127 ("python-dateutil" ,python-dateutil)
128 ("python-easygui" ,python-easygui)
129 ("python-colour" ,python-colour)
130 ("python-pymediainfo" ,python-pymediainfo)
131 ("python-sortedcontainers" ,python-sortedcontainers)
132 ("python-rawkit" ,python-rawkit)
133 ("python-requests" ,python-requests)
134 ("python-colorlog" ,python-colorlog)
135 ("python-pyprind" ,python-pyprind)
136 ("python-tenacity" ,python-tenacity)
137 ("perl-image-exiftool" ,perl-image-exiftool)))
138 (arguments
139 `(#:phases
140 (modify-phases %standard-phases
141 (add-after 'unpack 'patch-libmediainfo
142 (lambda _
143 (substitute* "raphodo/metadatavideo.py"
144 (("pymedia_library_file = 'libmediainfo.so.0'")
145 (string-append "pymedia_library_file = '"
146 (assoc-ref %build-inputs "libmediainfo")
147 "/lib/libmediainfo.so.0'")))
148 #t))
149 (add-after 'install 'wrap
150 (lambda* (#:key inputs outputs #:allow-other-keys)
151 (let ((out (assoc-ref outputs "out"))
152 (path (string-join
153 (list (string-append
154 (assoc-ref inputs "perl-image-exiftool")
155 "/bin"))
156 ":"))
157 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
158 (python-path (getenv "GUIX_PYTHONPATH")))
159 (for-each
160 (lambda (program)
161 (wrap-program program
162 `("PATH" ":" prefix (,path))
163 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
164 `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
165 (map (lambda (name)
166 (string-append out "/bin/" name))
167 '("analyze-pv-structure"
168 "rapid-photo-downloader"))))
169 #t)))))
170 (home-page "https://www.damonlynch.net/rapid/")
171 (synopsis "Import photos and videos from cameras, phones and memory cards")
172 (description "Import photos and videos from cameras, phones and memory
173 cards and generate meaningful file and folder names.")
174 (license license:gpl2+)))
175
176 (define-public libraw
177 (package
178 (name "libraw")
179 (version "0.20.0")
180 (source (origin
181 (method url-fetch)
182 (uri (string-append "https://www.libraw.org/data/LibRaw-"
183 version ".tar.gz"))
184 (sha256
185 (base32
186 "18wlsvj6c1rv036ph3695kknpgzc3lk2ikgshy8417yfl8ykh2hz"))))
187 (build-system gnu-build-system)
188 (native-inputs
189 (list pkg-config))
190 (inputs
191 (list libjpeg-turbo)) ;for lossy DNGs and old Kodak cameras
192 (propagated-inputs
193 (list lcms)) ;for color profiles
194 (home-page "https://www.libraw.org")
195 (synopsis "Raw image decoder")
196 (description
197 "LibRaw is a library for reading RAW files obtained from digital photo
198 cameras (CRW/CR2, NEF, RAF, DNG, and others).")
199 ;; LibRaw is distributed under both LGPL2.1 and CDDL 1.0. From the README:
200 ;; "You may use one of these licensing modes and switch between them. If
201 ;; you modify LibRaw source and made your changes public, you should accept
202 ;; both two licensing modes for your changes/additions."
203 (license (list license:lgpl2.1 license:cddl1.0))))
204
205 (define-public libraw-0.18
206 (package (inherit libraw)
207 (name "libraw")
208 (version "0.18.12")
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "https://www.libraw.org/data/LibRaw-"
212 version ".tar.gz"))
213 (sha256
214 (base32
215 "1m2khr2cij8z6lawgbmdksjn14fpnjsy8ad4qahnpqapm1slsxap"))))))
216
217 (define-public libexif
218 (package
219 (name "libexif")
220 (version "0.6.22")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append
224 "https://github.com/libexif/libexif/releases"
225 "/download/libexif-"
226 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
227 "-release/libexif-" version ".tar.xz"))
228 (sha256
229 (base32
230 "0mhcad5zab7fsn120rd585h8ncwkq904nzzrq8vcd72hzk4g2j2h"))))
231 (build-system gnu-build-system)
232 (home-page "https://libexif.github.io/")
233 (synopsis "Read and manipulate EXIF data in digital photographs")
234 (description
235 "The libexif C library allows applications to read, edit, and save EXIF
236 data as produced by digital cameras.")
237 (license license:lgpl2.1+)))
238
239 (define-public libgphoto2
240 (package
241 (name "libgphoto2")
242 (version "2.5.28")
243 (source (origin
244 (method url-fetch)
245 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
246 version "/libgphoto2-" version ".tar.bz2"))
247 (sha256
248 (base32
249 "1gayf81nzi8gxmwhgs4k1p0dwqajsx0h9lzjfvnib3100dm5j04n"))))
250 (build-system gnu-build-system)
251 (native-inputs (list pkg-config))
252 (inputs
253 (list libjpeg-turbo libltdl libusb libxml2))
254 (propagated-inputs
255 (list ;; The .pc refers to libexif.
256 libexif))
257 (home-page "http://www.gphoto.org/proj/libgphoto2/")
258 (synopsis "Accessing digital cameras")
259 (description
260 "This is the library backend for gphoto2. It contains the code for PTP,
261 MTP, and other vendor specific protocols for controlling and transferring data
262 from digital cameras.")
263
264 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
265 (license license:lgpl2.1+)))
266
267 (define-public gphoto2
268 (package
269 (name "gphoto2")
270 (version "2.5.28")
271 (source (origin
272 (method url-fetch)
273 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
274 "/gphoto2-" version ".tar.bz2"))
275 (sha256
276 (base32
277 "0xbki37q9ja34igidr2vj0ps1lp7sfz4xpsmh8h9x89dy76qsr1a"))))
278 (build-system gnu-build-system)
279 (native-inputs
280 (list pkg-config))
281 (inputs
282 (list readline libjpeg-turbo popt libexif libgphoto2))
283 (arguments
284 '(#:phases
285 (modify-phases %standard-phases
286 (add-before 'check 'pre-check
287 (lambda* (#:key inputs #:allow-other-keys)
288 (substitute* (find-files "tests/data" "\\.param$")
289 (("/usr/bin/env")
290 (which "env"))))))
291 ;; FIXME: There is 1 test failure, most likely related to the build
292 ;; environment.
293 #:tests? #f))
294 (home-page "http://www.gphoto.org/")
295 (synopsis "Command-line tools to access digital cameras")
296 (description
297 "Gphoto2 is a set of command line utilities for manipulating a large
298 number of different digital cameras. Through libgphoto2, it supports PTP,
299 MTP, and much more.")
300
301 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
302 (license license:gpl2+)))
303
304 ;; Note: See <https://metacpan.org/pod/Image::ExifTool> for the latest
305 ;; release. The versions at <https://www.sno.phy.queensu.ca/~phil/exiftool/>
306 ;; are not meant for production use according to the Changes file.
307 (define-public perl-image-exiftool
308 (package
309 (name "perl-image-exiftool")
310 (version "12.16")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (list
315 (string-append "mirror://cpan/authors/id/E/EX/EXIFTOOL/"
316 "Image-ExifTool-" version ".tar.gz")
317 ;; New releases may take a while to hit CPAN.
318 (string-append "https://www.sno.phy.queensu.ca/~phil/exiftool/"
319 "Image-ExifTool-" version ".tar.gz")))
320 (patches (search-patches "perl-image-exiftool-CVE-2021-22204.patch"))
321 (sha256
322 (base32
323 "0skm22b3gg1bfk0amklrprpva41m6mkrhqp0gi7z1nmcf9ypjh61"))))
324 (build-system perl-build-system)
325 (arguments
326 '(#:phases
327 (modify-phases %standard-phases
328 (add-after 'install 'post-install
329 (lambda* (#:key outputs #:allow-other-keys)
330 ;; Make sure the 'exiftool' commands finds the library.
331 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
332 (let* ((out (assoc-ref outputs "out"))
333 (pm (find-files out "^ExifTool\\.pm$"))
334 (lib (dirname (dirname (car pm)))))
335 (wrap-program (string-append out "/bin/exiftool")
336 `("PERL5LIB" prefix (,lib)))
337 #t))))))
338 (home-page "https://metacpan.org/release/Image-ExifTool")
339 (synopsis "Program and Perl library to manipulate EXIF and other metadata")
340 (description "This package provides the @code{exiftool} command and the
341 @code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images
342 and a wide variety of other metadata.")
343 (license license:perl-license)))
344
345 (define-public libpano13
346 (package
347 (name "libpano13")
348 (version "2.9.20_rc3")
349 (source (origin
350 (method url-fetch)
351 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
352 "libpano13-" (first
353 (string-split version #\_))
354 "/libpano13-" version ".tar.gz"))
355 (sha256
356 (base32
357 "12cv4886l1czfjwy7k6ipgf3zjksgwhdjzr2s9fdg33vqcv2hlrv"))))
358 (build-system cmake-build-system)
359 (inputs
360 (list libjpeg-turbo libpng libtiff zlib))
361 (home-page "http://panotools.sourceforge.net/")
362 (synopsis "Library for panoramic images")
363 (description
364 "The libpano13 package contains the backend library written by the
365 Panorama Tools project for building panoramic images from a set of
366 overlapping images, as well as some command line tools.")
367 (license license:gpl2+)))
368
369 (define-public enblend-enfuse
370 (package
371 (name "enblend-enfuse")
372 (version "4.2")
373 (source (origin
374 (method url-fetch)
375 (uri (string-append "mirror://sourceforge/enblend/"
376 name "/"
377 name "-" (version-major+minor version) "/"
378 name "-" version ".tar.gz"))
379 (sha256
380 (base32
381 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
382 (build-system gnu-build-system)
383 (native-inputs
384 `(("pkg-config" ,pkg-config)
385 ("perl" ,perl)
386 ("perl-timedate" ,perl-timedate)
387 ;; for building the documentation
388 ("gnuplot" ,gnuplot)
389 ("help2man" ,help2man)
390 ("imagemagick" ,imagemagick)
391 ("libxml2" ,libxml2)
392 ("texlive-minimal" ,texlive-tiny)
393 ("tidy" ,tidy)
394 ("transfig" ,transfig)))
395 (inputs
396 `(("boost" ,boost)
397 ("gsl" ,gsl)
398 ("lcms" ,lcms)
399 ("libjpeg" ,libjpeg-turbo)
400 ("libpng" ,libpng)
401 ("libtiff" ,libtiff)
402 ("openexr" ,openexr-2)
403 ("vigra" ,vigra)
404 ("zlib" ,zlib)))
405 (arguments
406 `(#:configure-flags `("--enable-openmp")))
407 (home-page "http://enblend.sourceforge.net/")
408 (synopsis "Tools for combining and blending images")
409 (description
410 "Enblend blends away the seams in a panoramic image mosaic using a
411 multi-resolution spline. Enfuse merges different exposures of the same
412 scene to produce an image that looks much like a tone-mapped image.")
413 (license license:gpl2+)))
414
415 (define-public lensfun
416 (package
417 (name "lensfun")
418 (version "0.3.2")
419 (source (origin
420 (method url-fetch)
421 (uri (string-append
422 "mirror://sourceforge/lensfun/"
423 version "/lensfun-" version ".tar.gz"))
424 (sha256
425 (base32
426 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
427 (build-system cmake-build-system)
428 (arguments
429 `(,@(if (any (cute string-prefix? <> (or (%current-system)
430 (%current-target-system)))
431 '("x86_64" "i686"))
432 ;; SSE and SSE2 are supported only on Intel processors.
433 '()
434 '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF")))
435 #:tests? #f)) ; There are no tests to run.
436 (native-inputs
437 (list pkg-config))
438 (inputs
439 (list glib))
440 (home-page "https://sourceforge.net/projects/lensfun/")
441 (synopsis "Library to correct optical lens defects with a lens database")
442 (description "Digital photographs are not ideal. Of course, the better is
443 your camera, the better the results will be, but in any case if you look
444 carefully at shots taken even by the most expensive cameras equipped with the
445 most expensive lenses you will see various artifacts. It is very hard to make
446 ideal cameras, because there are a lot of factors that affect the final image
447 quality, and at some point camera and lens designers have to trade one factor
448 for another to achieve the optimal image quality, within the given design
449 restrictions and budget. But we all want ideal shots, don't we? So that's
450 what's Lensfun is all about: rectifying the defects introduced by your
451 photographic equipment.")
452 ;; The libraries are licensed under the LGPL3, the programs are
453 ;; licensed GPL3, and the database is license CC-BY-SA 3.0. See the
454 ;; README.md file for this clarification.
455 (license (list license:lgpl3 license:gpl3 license:cc-by-sa3.0))))
456
457 (define-public darktable
458 (package
459 (name "darktable")
460 (version "3.6.1")
461 (source
462 (origin
463 (method url-fetch)
464 (uri (string-append
465 "https://github.com/darktable-org/darktable/releases/"
466 "download/release-" version "/darktable-" version ".tar.xz"))
467 (sha256
468 (base32 "051dwhdqa9q3zyrvr78g0cfzl1zhaagfvgx9axa9895q0g0wggx2"))))
469 (build-system cmake-build-system)
470 (arguments
471 `(#:configure-flags '("-DBINARY_PACKAGE_BUILD=On"
472 "-DBUILD_TESTING=On")
473 #:phases
474 (modify-phases %standard-phases
475 (add-after 'unpack 'libOpenCL-path
476 (lambda* (#:key inputs #:allow-other-keys)
477 ;; Statically link to libOpenCL.
478 (substitute* "./src/common/dlopencl.c"
479 (("\"libOpenCL\"")
480 (string-append "\"" (assoc-ref inputs "opencl-icd-loader")
481 "/lib/libOpenCL.so\"")))))
482 (add-before 'configure 'prepare-build-environment
483 (lambda* (#:key inputs #:allow-other-keys)
484 ;; Rawspeed fails to build with GCC due to OpenMP error:
485 ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'"
486 (setenv "CC" "clang") (setenv "CXX" "clang++")
487 ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
488 ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
489 (substitute* "CMakeLists.txt"
490 (("\\$\\{LLVM_INSTALL_PREFIX\\}")
491 (assoc-ref %build-inputs "clang")))))
492 (add-before 'configure 'set-LDFLAGS
493 (lambda* (#:key outputs #:allow-other-keys)
494 (setenv "LDFLAGS"
495 (string-append
496 "-Wl,-rpath="
497 (assoc-ref outputs "out") "/lib/darktable"))))
498 (add-after 'install 'wrap-program
499 (lambda* (#:key inputs outputs #:allow-other-keys)
500 (wrap-program (string-append (assoc-ref outputs "out")
501 "/bin/darktable")
502 ;; For GtkFileChooserDialog.
503 `("GSETTINGS_SCHEMA_DIR" =
504 (,(string-append (assoc-ref inputs "gtk+")
505 "/share/glib-2.0/schemas")))))))))
506 (native-inputs
507 `(("clang" ,clang-11)
508 ("cmocka" ,cmocka)
509 ("desktop-file-utils" ,desktop-file-utils)
510 ("glib:bin" ,glib "bin")
511 ("gobject-introspection" ,gobject-introspection)
512 ("intltool" ,intltool)
513 ("llvm" ,llvm-11) ;should match the Clang version
514 ("opencl-headers" ,opencl-headers)
515 ("perl" ,perl)
516 ("pkg-config" ,pkg-config)
517 ("po4a" ,po4a)
518 ("python" ,python-wrapper)
519 ("ruby" ,ruby)))
520 (inputs
521 `(("cairo" ,cairo)
522 ("colord-gtk" ,colord-gtk) ;optional, for color profile support
523 ("cups" ,cups) ;optional, for printing support
524 ("curl" ,curl)
525 ("dbus-glib" ,dbus-glib)
526 ("exiv2" ,exiv2)
527 ("freeimage" ,freeimage)
528 ("gmic" ,gmic) ;optional, for HaldcLUT support
529 ("graphicsmagick" ,graphicsmagick)
530 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
531 ("gtk+" ,gtk+)
532 ("imath" ,imath)
533 ("iso-codes" ,iso-codes) ;optional, for language names in the preferences
534 ("json-glib" ,json-glib)
535 ("lcms" ,lcms)
536 ("lensfun" ,lensfun) ;optional, for the lens distortion plugin
537 ("libgphoto2" ,libgphoto2) ;optional, for camera tethering
538 ("libavif" ,libavif) ;optional, for AVIF support
539 ("libjpeg" ,libjpeg-turbo)
540 ("libomp" ,libomp)
541 ("libpng" ,libpng)
542 ("librsvg" ,librsvg)
543 ("libsecret" ,libsecret) ;optional, for storing passwords
544 ("libsoup" ,libsoup-minimal-2)
545 ("libtiff" ,libtiff)
546 ("libwebp" ,libwebp) ;optional, for WebP support
547 ("libxml2" ,libxml2)
548 ("libxslt" ,libxslt)
549 ("lua" ,lua) ;optional, for plugins
550 ("opencl-icd-loader" ,opencl-icd-loader) ;optional, for OpenCL support
551 ("openexr" ,openexr) ;optional, for EXR import/export
552 ("openjpeg" ,openjpeg) ;optional, for JPEG2000 export
553 ("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view
554 ("pugixml" ,pugixml)
555 ("python-jsonschema" ,python-jsonschema)
556 ("sqlite" ,sqlite)))
557 (home-page "https://www.darktable.org")
558 (synopsis "Virtual lighttable and darkroom for photographers")
559 (description "Darktable is a photography workflow application and RAW
560 developer. It manages your digital negatives in a database, lets you view
561 them through a zoomable lighttable and enables you to develop raw images
562 and enhance them.")
563 ;; See src/is_supported_platform.h for supported platforms.
564 (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"))
565 (license (list license:gpl3+ ;; Darktable itself.
566 license:lgpl2.1+)))) ;; Rawspeed library.
567
568 (define-public photoflare
569 (package
570 (name "photoflare")
571 (version "1.6.9")
572 (source
573 (origin
574 (method git-fetch)
575 (uri (git-reference
576 (url "https://github.com/photoflare/photoflare")
577 (commit (string-append "v" version))))
578 (file-name (git-file-name name version))
579 (sha256
580 (base32 "121fhbggsh6jhrr7m41f27fd34ql7libdr2v0ig5bj6nc2ddwd40"))))
581 (build-system gnu-build-system)
582 (arguments
583 '(#:tests? #f ;no tests
584 #:phases
585 (modify-phases %standard-phases
586 (replace 'configure
587 (lambda* (#:key inputs outputs #:allow-other-keys)
588 (let ((magickpp (assoc-ref inputs "graphicsmagick"))
589 (out (assoc-ref outputs "out")))
590 (invoke "qmake"
591 (string-append "INCLUDEPATH += " magickpp
592 "/include/GraphicsMagick")
593 (string-append "PREFIX=" out)
594 "Photoflare.pro")))))))
595 (native-inputs
596 (list pkg-config qttools))
597 (inputs
598 (list graphicsmagick libomp qtbase-5))
599 (home-page "https://photoflare.io")
600 (synopsis "Quick, simple but powerful image editor")
601 (description "Photoflare is a cross-platform image editor with an aim
602 to balance between powerful features and a very friendly graphical user
603 interface. It suits a wide variety of different tasks and users who value a
604 more nimble workflow. Features include basic image editing capabilities,
605 paint brushes, image filters, colour adjustments and more advanced features
606 such as Batch image processing.")
607 (license license:gpl3+)))
608
609 (define-public entangle
610 (package
611 (name "entangle")
612 (version "3.0")
613 (source
614 (origin
615 (method git-fetch)
616 (uri (git-reference
617 (url "https://gitlab.com/entangle/entangle")
618 (commit (string-append "v" version))))
619 (file-name (git-file-name name version))
620 (sha256
621 (base32 "1pdmgxjdb3xlcqsaz7l8qzj5f7g7nwzhsrgid8929bm36d49cgc7"))))
622 (build-system meson-build-system)
623 (arguments
624 `(#:glib-or-gtk? #t
625 #:phases
626 (modify-phases %standard-phases
627 (add-after 'unpack 'skip-gtk-update-icon-cache
628 ;; Don't create 'icon-theme.cache'.
629 (lambda _
630 (substitute* "meson_post_install.py"
631 (("gtk-update-icon-cache") "true"))
632 #t))
633 (add-after 'install 'wrap-gi-python
634 ;; Make GTK find files needed by plugins.
635 (lambda* (#:key inputs outputs #:allow-other-keys)
636 (let ((out (assoc-ref outputs "out"))
637 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
638 (python-path (getenv "GUIX_PYTHONPATH")))
639 (wrap-program (string-append out "/bin/entangle")
640 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
641 `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
642 #t)))))
643 (native-inputs
644 `(("cmake" ,cmake)
645 ("gettext" ,gettext-minimal)
646 ("glib:bin" ,glib "bin")
647 ("gobject-introspection" ,gobject-introspection)
648 ("gtk-doc" ,gtk-doc)
649 ("perl" ,perl)
650 ("pkg-config" ,pkg-config)
651 ("xmllint" ,libxml2)))
652 (inputs
653 (list gdk-pixbuf
654 gexiv2
655 gst-plugins-base
656 gstreamer
657 gtk+
658 lcms
659 libgphoto2
660 libgudev
661 libpeas
662 libraw
663 python
664 python-pygobject))
665 (home-page "https://entangle-photo.org/")
666 (synopsis "Camera control and capture")
667 (description
668 "Entangle is an application which uses GTK and libgphoto2 to provide a
669 graphical interface for tethered photography with digital cameras. It
670 includes control over camera shooting and configuration settings and 'hands
671 off' shooting directly from the controlling computer.")
672 (license license:gpl3+)))
673
674 (define-public hugin
675 (package
676 (name "hugin")
677 (version "2020.0.0")
678 (source (origin
679 (method url-fetch)
680 (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
681 (version-major+minor version)
682 "/hugin-" version ".tar.bz2"))
683 (sha256
684 (base32
685 "1jyazc0mbr9g7vrichpqqnfl72lj21244csk0z5i8ycs4l0pcgi8"))))
686 (build-system cmake-build-system)
687 (native-inputs
688 `(("gettext" ,gettext-minimal)
689 ("pkg-config" ,pkg-config)))
690 (inputs
691 `(("boost" ,boost)
692 ("enblend-enfuse" ,enblend-enfuse)
693 ("exiv2" ,exiv2)
694 ("fftw" ,fftw)
695 ("flann" ,flann)
696 ("freeglut" ,freeglut)
697 ("glew" ,glew)
698 ("lcms" ,lcms)
699 ("libjpeg" ,libjpeg-turbo)
700 ("libpano13" ,libpano13)
701 ("libpng" ,libpng)
702 ("libtiff" ,libtiff)
703 ("libxi" ,libxi)
704 ("libxmu" ,libxmu)
705 ("mesa" ,mesa)
706 ("openexr" ,openexr-2)
707 ("sqlite" ,sqlite)
708 ("vigra" ,vigra)
709 ("wxwidgets" ,wxwidgets)
710 ("zlib" ,zlib)))
711 (arguments
712 `(#:tests? #f ; no check target
713 #:configure-flags
714 (list
715 ;; The header files of ilmbase (propagated by openexr) are not found
716 ;; when included by the header files of openexr, and an explicit
717 ;; flag needs to be set.
718 (string-append "-DCMAKE_CXX_FLAGS=-I"
719 (assoc-ref %build-inputs "ilmbase")
720 "/include/OpenEXR")
721 ;; Disable installation of the Python scripting interface.
722 ;; It would require the additional inputs python and swig.
723 ;; Installation would need to be tweaked, as it tries to install
724 ;; into the python directory.
725 "-DBUILD_HSI=OFF")
726 #:phases
727 (modify-phases %standard-phases
728 (add-before 'configure 'substitute
729 (lambda _
730 (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp"
731 (("wxT\\(\"enblend\"\\)")
732 (string-append "wxT(\"" (which "enblend") "\")"))
733 (("wxT\\(\"enfuse\"\\)")
734 (string-append "wxT(\"" (which "enfuse") "\")")))
735 #t)))))
736 (home-page "http://hugin.sourceforge.net/")
737 (synopsis "Panorama photo stitcher")
738 (description
739 "Hugin is an easy to use panoramic imaging toolchain with a graphical
740 user interface. It can be used to assemble a mosaic of photographs into
741 a complete panorama and stitch any series of overlapping pictures.")
742 (license license:gpl2+)))
743
744 (define-public rawtherapee
745 (package
746 (name "rawtherapee")
747 (version "5.8")
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "https://rawtherapee.com/shared/source/"
751 "rawtherapee-" version ".tar.xz"))
752 (sha256
753 (base32
754 "0lq8qi7g0a28h3rab7bk5bbbd4gvfma42bvlz1dfn8p9mah2h19n"))))
755 (build-system cmake-build-system)
756 (arguments
757 '(#:tests? #f ; no test suite
758 #:build-type "release"
759 #:configure-flags
760 (list (string-append "-DLENSFUNDBDIR="
761 (assoc-ref %build-inputs "lensfun")
762 "/share/lensfun")
763 ;; Don't optimize the build for the host machine. See the file
764 ;; 'ProcessorTargets.cmake' in the source distribution for more
765 ;; information.
766 "-DPROC_TARGET_NUMBER=1"
767 ;; These flags are recommended by upstream for distributed packages.
768 ;; See the file 'RELEASE_NOTES.txt' in the source distribution.
769 "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
770 "-DCMAKE_C_FLAGS=-O3 -fPIC"
771 "-DCACHE_NAME_SUFFIX=\"\"")))
772 (native-inputs
773 (list pkg-config))
774 (inputs
775 `(("expat" ,expat)
776 ("fftw" ,fftwf)
777 ("glib" ,glib)
778 ("glibmm" ,glibmm)
779 ("gtk+" ,gtk+)
780 ("gtkmm" ,gtkmm-3)
781 ("lcms" ,lcms)
782 ("lensfun" ,lensfun)
783 ("libcanberra" ,libcanberra)
784 ("libiptcdata" ,libiptcdata)
785 ("libjpeg" ,libjpeg-turbo)
786 ("libpng" ,libpng)
787 ("librsvg" ,librsvg)
788 ("libsigc++" ,libsigc++)
789 ("libtiff" ,libtiff)
790 ("zlib" ,zlib)))
791 (home-page "https://rawtherapee.com")
792 (synopsis "Raw image developing and processing")
793 (description "RawTherapee is a raw image processing suite. It comprises a
794 subset of image editing operations specifically aimed at non-destructive raw
795 photo post-production and is primarily focused on improving a photographer's
796 workflow by facilitating the handling of large numbers of images. Most raw
797 formats are supported, including Pentax Pixel Shift, Canon Dual-Pixel, and those
798 from Foveon and X-Trans sensors.")
799 (license license:gpl3+)))