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