Commit | Line | Data |
---|---|---|
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) |
0c73eed3 | 31 | #:use-module (guix build-system meson) |
b138ec94 | 32 | #:use-module (guix build-system perl) |
39af91db | 33 | #:use-module (guix build-system python) |
f0644195 | 34 | #:use-module (guix download) |
c53d529f | 35 | #:use-module (guix git-download) |
f0644195 AE |
36 | #:use-module ((guix licenses) #:prefix license:) |
37 | #:use-module (guix packages) | |
8957241d | 38 | #:use-module (guix utils) |
ce16d312 | 39 | #:use-module (gnu packages) |
1d093724 | 40 | #:use-module (gnu packages algebra) |
9208d0c1 | 41 | #:use-module (gnu packages autotools) |
f0644195 | 42 | #:use-module (gnu packages base) |
8957241d | 43 | #:use-module (gnu packages boost) |
0c73eed3 | 44 | #:use-module (gnu packages cmake) |
0e6412c1 | 45 | #:use-module (gnu packages compression) |
9305dfb9 | 46 | #:use-module (gnu packages cups) |
91a9c65c | 47 | #:use-module (gnu packages curl) |
39af91db SS |
48 | #:use-module (gnu packages file) |
49 | #:use-module (gnu packages freedesktop) | |
9305dfb9 | 50 | #:use-module (gnu packages geo) |
1d093724 | 51 | #:use-module (gnu packages gettext) |
8957241d AE |
52 | #:use-module (gnu packages ghostscript) |
53 | #:use-module (gnu packages gl) | |
91a9c65c | 54 | #:use-module (gnu packages gnome) |
c49840f8 | 55 | #:use-module (gnu packages glib) |
8957241d | 56 | #:use-module (gnu packages graphics) |
39af91db | 57 | #:use-module (gnu packages gstreamer) |
91a9c65c | 58 | #:use-module (gnu packages gtk) |
0e6412c1 | 59 | #:use-module (gnu packages image) |
172ca314 | 60 | #:use-module (gnu packages image-processing) |
8957241d | 61 | #:use-module (gnu packages imagemagick) |
9305dfb9 | 62 | #:use-module (gnu packages iso-codes) |
13d9794d | 63 | #:use-module (gnu packages libcanberra) |
f0644195 | 64 | #:use-module (gnu packages libusb) |
91a9c65c | 65 | #:use-module (gnu packages llvm) |
9305dfb9 | 66 | #:use-module (gnu packages lua) |
d16479c5 | 67 | #:use-module (gnu packages man) |
8957241d | 68 | #:use-module (gnu packages maths) |
172ca314 | 69 | #:use-module (gnu packages opencl) |
b138ec94 | 70 | #:use-module (gnu packages perl) |
f0644195 AE |
71 | #:use-module (gnu packages pkg-config) |
72 | #:use-module (gnu packages popt) | |
91a9c65c | 73 | #:use-module (gnu packages python) |
44d10b1f | 74 | #:use-module (gnu packages python-xyz) |
39af91db SS |
75 | #:use-module (gnu packages python-web) |
76 | #:use-module (gnu packages qt) | |
8957241d | 77 | #:use-module (gnu packages readline) |
cd0322a3 | 78 | #:use-module (gnu packages sqlite) |
8f9ac901 | 79 | #:use-module (gnu packages tex) |
39af91db SS |
80 | #:use-module (gnu packages time) |
81 | #:use-module (gnu packages video) | |
8957241d | 82 | #:use-module (gnu packages web) |
1d093724 | 83 | #:use-module (gnu packages wxwidgets) |
8957241d | 84 | #:use-module (gnu packages xfig) |
1d093724 | 85 | #:use-module (gnu packages xorg) |
4dbef239 | 86 | #:use-module (gnu packages xml) |
4e9dfe39 | 87 | #:use-module ((srfi srfi-1) #:hide (zip)) |
4dbef239 | 88 | #:use-module (srfi srfi-26)) |
9208d0c1 | 89 | |
39af91db SS |
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 | ||
d9cef612 RW |
175 | (define-public libraw |
176 | (package | |
177 | (name "libraw") | |
271f2786 | 178 | (version "0.20.0") |
d9cef612 RW |
179 | (source (origin |
180 | (method url-fetch) | |
fe535d81 | 181 | (uri (string-append "https://www.libraw.org/data/LibRaw-" |
d9cef612 RW |
182 | version ".tar.gz")) |
183 | (sha256 | |
184 | (base32 | |
271f2786 | 185 | "18wlsvj6c1rv036ph3695kknpgzc3lk2ikgshy8417yfl8ykh2hz")))) |
d9cef612 | 186 | (build-system gnu-build-system) |
afb27214 MB |
187 | (native-inputs |
188 | `(("pkg-config" ,pkg-config))) | |
189 | (inputs | |
4bd428a7 | 190 | `(("libjpeg" ,libjpeg-turbo))) ;for lossy DNGs and old Kodak cameras |
afb27214 MB |
191 | (propagated-inputs |
192 | `(("lcms" ,lcms))) ;for color profiles | |
fe535d81 | 193 | (home-page "https://www.libraw.org") |
d9cef612 RW |
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).") | |
afea8694 MB |
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)))) | |
d9cef612 | 203 | |
fd67d793 LF |
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 | ||
9208d0c1 LC |
216 | (define-public libexif |
217 | (package | |
218 | (name "libexif") | |
8bd0b533 | 219 | (version "0.6.22") |
9208d0c1 LC |
220 | (source (origin |
221 | (method url-fetch) | |
8bd0b533 MB |
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")) | |
9208d0c1 LC |
227 | (sha256 |
228 | (base32 | |
8bd0b533 | 229 | "0mhcad5zab7fsn120rd585h8ncwkq904nzzrq8vcd72hzk4g2j2h")))) |
9208d0c1 | 230 | (build-system gnu-build-system) |
f2d2dc70 | 231 | (home-page "https://libexif.github.io/") |
9208d0c1 LC |
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.") | |
341f4965 | 236 | (license license:lgpl2.1+))) |
9208d0c1 LC |
237 | |
238 | (define-public libgphoto2 | |
239 | (package | |
240 | (name "libgphoto2") | |
e4516126 | 241 | (version "2.5.25") |
9208d0c1 LC |
242 | (source (origin |
243 | (method url-fetch) | |
de67e922 LF |
244 | (uri (string-append "mirror://sourceforge/gphoto/libgphoto/" |
245 | version "/libgphoto2-" version ".tar.bz2")) | |
9208d0c1 LC |
246 | (sha256 |
247 | (base32 | |
e4516126 | 248 | "0fkz2rx7xlmr6zl6f56hhxps6bx16dwcw5pyd8c2icf273s9h3kw")))) |
9208d0c1 LC |
249 | (build-system gnu-build-system) |
250 | (native-inputs `(("pkg-config" ,pkg-config))) | |
251 | (inputs | |
7e49a851 | 252 | `(("libjpeg-turbo" ,libjpeg-turbo) |
3246cc91 | 253 | ("libltdl" ,libltdl) |
d32f4800 TGR |
254 | ("libusb" ,libusb) |
255 | ("libxml2" ,libxml2))) | |
9208d0c1 LC |
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+. | |
341f4965 | 267 | (license license:lgpl2.1+))) |
9208d0c1 LC |
268 | |
269 | (define-public gphoto2 | |
270 | (package | |
271 | (name "gphoto2") | |
ee82f80d | 272 | (version "2.5.23") |
9208d0c1 LC |
273 | (source (origin |
274 | (method url-fetch) | |
de67e922 LF |
275 | (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version |
276 | "/gphoto2-" version ".tar.bz2")) | |
9208d0c1 LC |
277 | (sha256 |
278 | (base32 | |
ee82f80d | 279 | "1laqwhxr0xhbykmp0dhd3j4rr2lhj5y228s31afnqxp700hhk1yz")))) |
9208d0c1 LC |
280 | (build-system gnu-build-system) |
281 | (native-inputs | |
282 | `(("pkg-config" ,pkg-config))) | |
283 | (inputs | |
284 | `(("readline" ,readline) | |
7e49a851 | 285 | ("libjpeg-turbo" ,libjpeg-turbo) |
9208d0c1 LC |
286 | ("popt" ,popt) |
287 | ("libexif" ,libexif) | |
288 | ("libgphoto2" ,libgphoto2))) | |
289 | (arguments | |
dc1d3cde KK |
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))) | |
9208d0c1 | 298 | |
a0bb98c3 | 299 | ;; FIXME: There is 1 test failure, most likely related to the build |
9208d0c1 LC |
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+. | |
341f4965 | 311 | (license license:gpl2+))) |
b138ec94 | 312 | |
b89bb804 MB |
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. | |
b138ec94 LC |
316 | (define-public perl-image-exiftool |
317 | (package | |
318 | (name "perl-image-exiftool") | |
cbfa8bb3 | 319 | (version "11.85") |
0234f4af TGR |
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 | |
cbfa8bb3 LF |
330 | (base32 |
331 | "15zqm0ly2b3paqg0ym44ib2mvh6k18a9q5rvdirwipqa127al2lb")))) | |
b138ec94 LC |
332 | (build-system perl-build-system) |
333 | (arguments | |
33717a17 LF |
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") | |
4851af9e MW |
344 | `("PERL5LIB" prefix (,lib))) |
345 | #t)))))) | |
9aba9b12 | 346 | (home-page "https://metacpan.org/release/Image-ExifTool") |
ae6591ef LF |
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.") | |
2f3108ad | 351 | (license license:perl-license))) |
0e6412c1 AE |
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 | |
4bd428a7 | 367 | `(("libjpeg" ,libjpeg-turbo) |
0e6412c1 AE |
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+))) | |
8957241d AE |
378 | |
379 | (define-public enblend-enfuse | |
380 | (package | |
381 | (name "enblend-enfuse") | |
d16479c5 | 382 | (version "4.2") |
8957241d AE |
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 | |
d16479c5 | 391 | "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7")))) |
8957241d AE |
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) | |
d16479c5 | 399 | ("help2man" ,help2man) |
8957241d AE |
400 | ("imagemagick" ,imagemagick) |
401 | ("libxml2" ,libxml2) | |
84de27c8 | 402 | ("texlive-minimal" ,texlive-tiny) |
8957241d AE |
403 | ("tidy" ,tidy) |
404 | ("transfig" ,transfig))) | |
405 | (inputs | |
406 | `(("boost" ,boost) | |
407 | ("gsl" ,gsl) | |
408 | ("lcms" ,lcms) | |
4bd428a7 | 409 | ("libjpeg" ,libjpeg-turbo) |
8957241d AE |
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+))) | |
c49840f8 RJ |
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) | |
4dbef239 EF |
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. | |
c49840f8 RJ |
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)))) | |
91a9c65c RJ |
466 | |
467 | (define-public darktable | |
468 | (package | |
469 | (name "darktable") | |
c4902548 | 470 | (version "3.2.1") |
4b886fb0 TGR |
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 | |
c4902548 | 478 | (base32 "035rvqmw386hm0jpi14lf4dnpr5rjkalzjkyprqh42nwi3m86dkf")))) |
91a9c65c RJ |
479 | (build-system cmake-build-system) |
480 | (arguments | |
4b886fb0 | 481 | `(#:tests? #f ; there are no tests |
677bc34d | 482 | #:configure-flags '("-DBINARY_PACKAGE_BUILD=On") |
91a9c65c RJ |
483 | #:phases |
484 | (modify-phases %standard-phases | |
9305dfb9 VM |
485 | (add-before 'configure 'prepare-build-environment |
486 | (lambda* (#:key inputs #:allow-other-keys) | |
c4902548 VM |
487 | ;; Rawspeed fails to build with GCC due to OpenMP error: |
488 | ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'" | |
172ca314 VM |
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)) | |
17ac8bb6 MB |
496 | (add-before 'configure 'set-LDFLAGS-and-CPATH |
497 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
91a9c65c RJ |
498 | (setenv "LDFLAGS" |
499 | (string-append | |
500 | "-Wl,-rpath=" | |
501 | (assoc-ref outputs "out") "/lib/darktable")) | |
17ac8bb6 MB |
502 | |
503 | ;; Ensure the OpenEXR headers are found. | |
504 | (setenv "CPATH" | |
505 | (string-append (assoc-ref inputs "ilmbase") | |
506 | "/include/OpenEXR:" (or (getenv "CPATH") ""))) | |
9305dfb9 | 507 | #t)) |
9db1b378 VM |
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 | ;; For libOpenCL.so. | |
517 | `("LD_LIBRARY_PATH" = | |
518 | (,(string-append (assoc-ref inputs "ocl-icd") | |
519 | "/lib")))) | |
520 | #t))))) | |
d3673047 | 521 | (native-inputs |
9305dfb9 VM |
522 | `(("clang" ,clang-9) |
523 | ("desktop-file-utils" ,desktop-file-utils) | |
524 | ("glib:bin" ,glib "bin") | |
525 | ("gobject-introspection" ,gobject-introspection) | |
526 | ("intltool" ,intltool) | |
172ca314 VM |
527 | ("llvm" ,llvm-9) ;should match the Clang version |
528 | ("opencl-headers" ,opencl-headers) | |
d3673047 | 529 | ("perl" ,perl) |
9305dfb9 VM |
530 | ("pkg-config" ,pkg-config) |
531 | ("po4a" ,po4a))) | |
91a9c65c | 532 | (inputs |
9305dfb9 | 533 | `(("cairo" ,cairo) |
c4902548 VM |
534 | ("colord-gtk" ,colord-gtk) ;optional, for color profile support |
535 | ("cups" ,cups) ;optional, for printing support | |
9305dfb9 VM |
536 | ("curl" ,curl) |
537 | ("dbus-glib" ,dbus-glib) | |
538 | ("exiv2" ,exiv2) | |
539 | ("freeimage" ,freeimage) | |
c4902548 | 540 | ("gmic" ,gmic) ;optional, for HaldcLUT support |
9305dfb9 VM |
541 | ("graphicsmagick" ,graphicsmagick) |
542 | ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) | |
91a9c65c | 543 | ("gtk+" ,gtk+) |
9305dfb9 | 544 | ("ilmbase" ,ilmbase) |
c4902548 | 545 | ("iso-codes" ,iso-codes) ;optional, for language names in the preferences |
9305dfb9 VM |
546 | ("json-glib" ,json-glib) |
547 | ("lcms" ,lcms) | |
c4902548 VM |
548 | ("lensfun" ,lensfun) ;optional, for the lens distortion plugin |
549 | ("libgphoto2" ,libgphoto2) ;optional, for camera tethering | |
9db1b378 | 550 | ("libavif" ,libavif) ;optional, for AVIF support |
4bd428a7 | 551 | ("libjpeg" ,libjpeg-turbo) |
9305dfb9 | 552 | ("libomp" ,libomp) |
91a9c65c | 553 | ("libpng" ,libpng) |
9305dfb9 | 554 | ("librsvg" ,librsvg) |
c4902548 | 555 | ("libsecret" ,libsecret) ;optional, for storing passwords |
9305dfb9 | 556 | ("libsoup" ,libsoup) |
91a9c65c | 557 | ("libtiff" ,libtiff) |
c4902548 | 558 | ("libwebp" ,libwebp) ;optional, for WebP support |
9305dfb9 VM |
559 | ("libxml2" ,libxml2) |
560 | ("libxslt" ,libxslt) | |
c4902548 | 561 | ("lua" ,lua) ;optional, for plugins |
9db1b378 | 562 | ("ocl-icd" ,ocl-icd) ;optional, for OpenCL support |
c4902548 VM |
563 | ("openexr" ,openexr) ;optional, for EXR import/export |
564 | ("openjpeg" ,openjpeg) ;optional, for JPEG2000 export | |
565 | ("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view | |
9305dfb9 | 566 | ("pugixml" ,pugixml) |
91a9c65c | 567 | ("python-jsonschema" ,python-jsonschema) |
9305dfb9 | 568 | ("sqlite" ,sqlite))) |
91a9c65c RJ |
569 | (home-page "https://www.darktable.org") |
570 | (synopsis "Virtual lighttable and darkroom for photographers") | |
571 | (description "Darktable is a photography workflow application and RAW | |
572 | developer. It manages your digital negatives in a database, lets you view | |
573 | them through a zoomable lighttable and enables you to develop raw images | |
574 | and enhance them.") | |
4b886fb0 | 575 | ;; See src/is_supported_platform.h for supported platforms. |
9db1b378 | 576 | (supported-systems '("x86_64-linux" "aarch64-linux")) |
9305dfb9 VM |
577 | (license (list license:gpl3+ ;; Darktable itself. |
578 | license:lgpl2.1+)))) ;; Rawspeed library. | |
1d093724 | 579 | |
c53d529f VM |
580 | (define-public photoflare |
581 | (package | |
582 | (name "photoflare") | |
583 | (version "1.6.5") | |
584 | (source | |
585 | (origin | |
586 | (method git-fetch) | |
587 | (uri (git-reference | |
588 | (url "https://github.com/photoflare/photoflare") | |
589 | (commit (string-append "v" version)))) | |
590 | (file-name (git-file-name name version)) | |
591 | (sha256 | |
592 | (base32 "0a394324h7ds567z3i3pw6kkii78n4qwdn129kgkkm996yh03q89")))) | |
593 | (build-system gnu-build-system) | |
594 | (arguments | |
595 | '(#:tests? #f ;no tests | |
596 | #:phases | |
597 | (modify-phases %standard-phases | |
598 | (replace 'configure | |
599 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
600 | (let ((magickpp (assoc-ref inputs "graphicsmagick")) | |
601 | (out (assoc-ref outputs "out"))) | |
602 | (invoke "qmake" | |
603 | (string-append "INCLUDEPATH += " magickpp | |
604 | "/include/GraphicsMagick") | |
605 | (string-append "PREFIX=" out) | |
606 | "Photoflare.pro"))))))) | |
607 | (native-inputs | |
608 | `(("pkg-config" ,pkg-config) | |
609 | ("qttools" ,qttools))) | |
610 | (inputs | |
611 | `(("graphicsmagick" ,graphicsmagick) | |
612 | ("libomp" ,libomp) | |
613 | ("qtbase" ,qtbase))) | |
614 | (home-page "https://photoflare.io") | |
615 | (synopsis "Quick, simple but powerful image editor") | |
616 | (description "Photoflare is a cross-platform image editor with an aim | |
617 | to balance between powerful features and a very friendly graphical user | |
618 | interface. It suits a wide variety of different tasks and users who value a | |
619 | more nimble workflow. Features include basic image editing capabilities, | |
620 | paint brushes, image filters, colour adjustments and more advanced features | |
621 | such as Batch image processing.") | |
622 | (license license:gpl3+))) | |
623 | ||
0c73eed3 VM |
624 | (define-public entangle |
625 | (package | |
626 | (name "entangle") | |
627 | (version "3.0") | |
628 | (source | |
629 | (origin | |
630 | (method git-fetch) | |
631 | (uri (git-reference | |
632 | (url "https://gitlab.com/entangle/entangle") | |
633 | (commit (string-append "v" version)))) | |
634 | (file-name (git-file-name name version)) | |
635 | (sha256 | |
636 | (base32 "1pdmgxjdb3xlcqsaz7l8qzj5f7g7nwzhsrgid8929bm36d49cgc7")))) | |
637 | (build-system meson-build-system) | |
638 | (arguments | |
639 | `(#:glib-or-gtk? #t | |
640 | #:phases | |
641 | (modify-phases %standard-phases | |
642 | (add-after 'unpack 'skip-gtk-update-icon-cache | |
643 | ;; Don't create 'icon-theme.cache'. | |
644 | (lambda _ | |
645 | (substitute* "meson_post_install.py" | |
646 | (("gtk-update-icon-cache") "true")) | |
647 | #t)) | |
648 | (add-after 'install 'wrap-gi-python | |
649 | ;; Make GTK find files needed by plugins. | |
650 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
651 | (let ((out (assoc-ref outputs "out")) | |
652 | (gi-typelib-path (getenv "GI_TYPELIB_PATH")) | |
653 | (python-path (getenv "PYTHONPATH"))) | |
654 | (wrap-program (string-append out "/bin/entangle") | |
655 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) | |
656 | `("PYTHONPATH" ":" prefix (,python-path)))) | |
657 | #t))))) | |
658 | (native-inputs | |
659 | `(("cmake" ,cmake) | |
660 | ("gettext" ,gettext-minimal) | |
661 | ("glib:bin" ,glib "bin") | |
662 | ("gobject-introspection" ,gobject-introspection) | |
663 | ("gtk-doc" ,gtk-doc) | |
664 | ("perl" ,perl) | |
665 | ("pkg-config" ,pkg-config) | |
666 | ("xmllint" ,libxml2))) | |
667 | (inputs | |
668 | `(("gdk-pixbuf" ,gdk-pixbuf) | |
669 | ("gexiv2" ,gexiv2) | |
670 | ("gst-plugins-base" ,gst-plugins-base) | |
671 | ("gstreamer" ,gstreamer) | |
672 | ("gtk+" ,gtk+) | |
673 | ("lcms" ,lcms) | |
674 | ("libgphoto2" ,libgphoto2) | |
675 | ("libgudev" ,libgudev) | |
676 | ("libpeas" ,libpeas) | |
677 | ("libraw" ,libraw) | |
678 | ("python" ,python) | |
679 | ("python-pygobject" ,python-pygobject))) | |
680 | (home-page "https://entangle-photo.org/") | |
681 | (synopsis "Camera control and capture") | |
682 | (description | |
683 | "Entangle is an application which uses GTK and libgphoto2 to provide a | |
684 | graphical interface for tethered photography with digital cameras. It | |
685 | includes control over camera shooting and configuration settings and 'hands | |
686 | off' shooting directly from the controlling computer.") | |
687 | (license license:gpl3+))) | |
688 | ||
1d093724 AE |
689 | (define-public hugin |
690 | (package | |
691 | (name "hugin") | |
bb85018c | 692 | (version "2019.2.0") |
1d093724 AE |
693 | (source (origin |
694 | (method url-fetch) | |
695 | (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-" | |
696 | (version-major+minor version) | |
697 | "/hugin-" version ".tar.bz2")) | |
698 | (sha256 | |
699 | (base32 | |
bb85018c | 700 | "0gjsm5bgz10wbr5q3y74f8dzb238dh32xx0p5wa3yca6lbzbv9lb")))) |
1d093724 AE |
701 | (build-system cmake-build-system) |
702 | (native-inputs | |
f2d97d57 | 703 | `(("gettext" ,gettext-minimal) |
1d093724 AE |
704 | ("pkg-config" ,pkg-config))) |
705 | (inputs | |
706 | `(("boost" ,boost) | |
707 | ("enblend-enfuse" ,enblend-enfuse) | |
eafd0390 | 708 | ("exiv2" ,exiv2-0.26) |
1d093724 AE |
709 | ("fftw" ,fftw) |
710 | ("flann" ,flann) | |
711 | ("freeglut" ,freeglut) | |
712 | ("glew" ,glew) | |
713 | ("lcms" ,lcms) | |
4bd428a7 | 714 | ("libjpeg" ,libjpeg-turbo) |
1d093724 AE |
715 | ("libpano13" ,libpano13) |
716 | ("libpng" ,libpng) | |
717 | ("libtiff" ,libtiff) | |
718 | ("libxi" ,libxi) | |
719 | ("libxmu" ,libxmu) | |
720 | ("mesa" ,mesa) | |
721 | ("openexr" ,openexr) | |
722 | ("sqlite" ,sqlite) | |
723 | ("vigra" ,vigra) | |
724 | ("wxwidgets" ,wxwidgets) | |
725 | ("zlib" ,zlib))) | |
726 | (arguments | |
727 | `(#:tests? #f ; no check target | |
728 | #:configure-flags | |
729 | (list | |
730 | ;; The header files of ilmbase (propagated by openexr) are not found | |
731 | ;; when included by the header files of openexr, and an explicit | |
732 | ;; flag needs to be set. | |
733 | (string-append "-DCMAKE_CXX_FLAGS=-I" | |
734 | (assoc-ref %build-inputs "ilmbase") | |
735 | "/include/OpenEXR") | |
736 | ;; Disable installation of the Python scripting interface. | |
737 | ;; It would require the additional inputs python and swig. | |
738 | ;; Installation would need to be tweaked, as it tries to install | |
739 | ;; into the python directory. | |
740 | "-DBUILD_HSI=OFF") | |
741 | #:phases | |
742 | (modify-phases %standard-phases | |
743 | (add-before 'configure 'substitute | |
744 | (lambda _ | |
745 | (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp" | |
746 | (("wxT\\(\"enblend\"\\)") | |
747 | (string-append "wxT(\"" (which "enblend") "\")")) | |
748 | (("wxT\\(\"enfuse\"\\)") | |
749 | (string-append "wxT(\"" (which "enfuse") "\")"))) | |
750 | #t))))) | |
751 | (home-page "http://hugin.sourceforge.net/") | |
752 | (synopsis "Panorama photo stitcher") | |
753 | (description | |
754 | "Hugin is an easy to use panoramic imaging toolchain with a graphical | |
755 | user interface. It can be used to assemble a mosaic of photographs into | |
756 | a complete panorama and stitch any series of overlapping pictures.") | |
757 | (license license:gpl2+))) | |
758 | ||
13d9794d LF |
759 | (define-public rawtherapee |
760 | (package | |
761 | (name "rawtherapee") | |
0dc1f651 | 762 | (version "5.8") |
13d9794d LF |
763 | (source (origin |
764 | (method url-fetch) | |
765 | (uri (string-append "http://rawtherapee.com/shared/source/" | |
766 | "rawtherapee-" version ".tar.xz")) | |
767 | (sha256 | |
768 | (base32 | |
0dc1f651 | 769 | "0lq8qi7g0a28h3rab7bk5bbbd4gvfma42bvlz1dfn8p9mah2h19n")))) |
13d9794d LF |
770 | (build-system cmake-build-system) |
771 | (arguments | |
e48c3dd9 | 772 | '(#:tests? #f ; no test suite |
3def739d | 773 | #:build-type "release" |
13d9794d LF |
774 | #:configure-flags |
775 | (list (string-append "-DLENSFUNDBDIR=" | |
776 | (assoc-ref %build-inputs "lensfun") | |
777 | "/share/lensfun") | |
e48c3dd9 TGR |
778 | ;; Don't optimize the build for the host machine. See the file |
779 | ;; 'ProcessorTargets.cmake' in the source distribution for more | |
780 | ;; information. | |
13d9794d | 781 | "-DPROC_TARGET_NUMBER=1" |
e48c3dd9 TGR |
782 | ;; These flags are recommended by upstream for distributed packages. |
783 | ;; See the file 'RELEASE_NOTES.txt' in the source distribution. | |
13d9794d LF |
784 | "-O3" |
785 | "-DCACHE_NAME_SUFFIX=\"\""))) | |
786 | (native-inputs | |
787 | `(("pkg-config" ,pkg-config))) | |
788 | (inputs | |
789 | `(("expat" ,expat) | |
790 | ("fftw" ,fftwf) | |
791 | ("glib" ,glib) | |
792 | ("glibmm" ,glibmm) | |
793 | ("gtk+" ,gtk+) | |
794 | ("gtkmm" ,gtkmm) | |
795 | ("lcms" ,lcms) | |
796 | ("lensfun" ,lensfun) | |
797 | ("libcanberra" ,libcanberra) | |
798 | ("libiptcdata" ,libiptcdata) | |
4bd428a7 | 799 | ("libjpeg" ,libjpeg-turbo) |
13d9794d | 800 | ("libpng" ,libpng) |
e48c3dd9 | 801 | ("librsvg" ,librsvg) |
13d9794d LF |
802 | ("libsigc++" ,libsigc++) |
803 | ("libtiff" ,libtiff) | |
804 | ("zlib" ,zlib))) | |
805 | (home-page "http://rawtherapee.com") | |
806 | (synopsis "Raw image developing and processing") | |
807 | (description "RawTherapee is a raw image processing suite. It comprises a | |
808 | subset of image editing operations specifically aimed at non-destructive raw | |
809 | photo post-production and is primarily focused on improving a photographer's | |
810 | workflow by facilitating the handling of large numbers of images. Most raw | |
811 | formats are supported, including Pentax Pixel Shift, Canon Dual-Pixel, and those | |
812 | from Foveon and X-Trans sensors.") | |
813 | (license license:gpl3+))) |