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