Commit | Line | Data |
---|---|---|
a37b8077 | 1 | ;;; GNU Guix --- Functional package management for GNU |
30347040 | 2 | ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
b2086776 | 3 | ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net> |
cb570156 | 4 | ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
e7472958 | 5 | ;;; Copyright © 2018, 2019, 202 Tobias Geerinckx-Rice <me@tobias.gr> |
9eecf9bc | 6 | ;;; Copyright © 2018 Leo Famulari <leo@famulari.name> |
65b8d610 | 7 | ;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de> |
a37b8077 LC |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages gimp) | |
25 | #:use-module (guix packages) | |
26 | #:use-module (guix download) | |
e5bbfc7d | 27 | #:use-module (guix git-download) |
1d6c6af0 | 28 | #:use-module (guix utils) |
b5b73a82 | 29 | #:use-module ((guix licenses) #:prefix license:) |
a37b8077 | 30 | #:use-module (guix build-system gnu) |
30347040 | 31 | #:use-module (guix build-system glib-or-gtk) |
54a114db | 32 | #:use-module (guix build-system meson) |
5f1ba089 | 33 | #:use-module (gnu packages) |
1d6c6af0 | 34 | #:use-module (gnu packages algebra) |
4b5c056a | 35 | #:use-module (gnu packages autotools) |
a37b8077 LC |
36 | #:use-module (gnu packages pkg-config) |
37 | #:use-module (gnu packages glib) | |
38 | #:use-module (gnu packages gtk) | |
39 | #:use-module (gnu packages gnome) | |
e55354b8 | 40 | #:use-module (gnu packages image) |
793bcc19 | 41 | #:use-module (gnu packages ghostscript) |
a37b8077 LC |
42 | #:use-module (gnu packages compression) |
43 | #:use-module (gnu packages xml) | |
61551868 | 44 | #:use-module (gnu packages pdf) |
a37b8077 | 45 | #:use-module (gnu packages photo) |
9c8bd626 | 46 | #:use-module (gnu packages python) |
657687d3 | 47 | #:use-module (gnu packages web) |
7988af99 | 48 | #:use-module (gnu packages xorg)) |
a37b8077 LC |
49 | |
50 | (define-public babl | |
51 | (package | |
52 | (name "babl") | |
e7472958 | 53 | (version "0.1.74") |
a37b8077 LC |
54 | (source (origin |
55 | (method url-fetch) | |
e70dc63a | 56 | (uri (list (string-append "https://download.gimp.org/pub/babl/" |
9d2e56d0 | 57 | (version-major+minor version) |
54a114db | 58 | "/babl-" version ".tar.xz") |
24d6cc1d | 59 | (string-append "https://ftp.gtk.org/pub/babl/" |
9d2e56d0 | 60 | (version-major+minor version) |
54a114db | 61 | "/babl-" version ".tar.xz") |
9d2e56d0 TGR |
62 | (string-append "ftp://ftp.gtk.org/pub/babl/" |
63 | (version-major+minor version) | |
54a114db | 64 | "/babl-" version ".tar.xz"))) |
a37b8077 LC |
65 | (sha256 |
66 | (base32 | |
e7472958 | 67 | "03nfcvy3453xkfvsfcnsfcjf2vg2pin09qnr9jlssdysa1lhnwcs")))) |
54a114db TGR |
68 | (build-system meson-build-system) |
69 | (arguments | |
70 | `(#:configure-flags | |
71 | (list "-Denable-gir=false"))) | |
72 | (native-inputs | |
73 | `(("pkg-config" ,pkg-config))) | |
74 | (propagated-inputs | |
75 | ;; Propagated to satisfy ‘babl.pc’. | |
76 | `(("lcms" ,lcms))) | |
a37b8077 LC |
77 | (home-page "http://gegl.org/babl/") |
78 | (synopsis "Image pixel format conversion library") | |
79 | (description | |
0c8ac76c TGR |
80 | "Babl is a dynamic, any-to-any pixel format translation library. |
81 | It allows converting between different methods of storing pixels, known as | |
82 | @dfn{pixel formats}, that have different bit depths and other data | |
83 | representations, color models, and component permutations. | |
a37b8077 LC |
84 | |
85 | A vocabulary to formulate new pixel formats from existing primitives is | |
0c8ac76c | 86 | provided, as well as a framework to add new color models and data types.") |
a37b8077 | 87 | (license license:lgpl3+))) |
12c0f32a JD |
88 | |
89 | (define-public gegl | |
90 | (package | |
91 | (name "gegl") | |
9564967e | 92 | (version "0.4.20") |
12c0f32a JD |
93 | (source (origin |
94 | (method url-fetch) | |
f62633ca | 95 | (uri (list (string-append "https://download.gimp.org/pub/gegl/" |
12c0f32a | 96 | (string-take version 3) |
bd70db6e TGR |
97 | "/gegl-" version ".tar.xz") |
98 | (string-append "https://ftp.gtk.org/pub/gegl/" | |
99 | (version-major+minor version) | |
100 | "/gegl-" version ".tar.xz") | |
101 | (string-append "ftp://ftp.gtk.org/pub/gegl/" | |
102 | (version-major+minor version) | |
103 | "/gegl-" version ".tar.xz"))) | |
12c0f32a JD |
104 | (sha256 |
105 | (base32 | |
9564967e | 106 | "1zrxnxlhn0jmshg4n2m2xlgi886w059ynkiiihm7rpi05fs8pg93")))) |
51282524 | 107 | (build-system meson-build-system) |
12c0f32a | 108 | (arguments |
51282524 TGR |
109 | `(#:configure-flags |
110 | (list "-Dintrospection=false"))) | |
f62633ca LF |
111 | ;; These are propagated to satisfy 'gegl-0.4.pc'. |
112 | (propagated-inputs | |
12c0f32a JD |
113 | `(("babl" ,babl) |
114 | ("glib" ,glib) | |
f62633ca LF |
115 | ("json-glib" ,json-glib))) |
116 | (inputs | |
117 | `(("cairo" ,cairo) | |
12c0f32a JD |
118 | ("pango" ,pango) |
119 | ("libpng" ,libpng) | |
cb570156 | 120 | ("libjpeg" ,libjpeg))) |
12c0f32a JD |
121 | (native-inputs |
122 | `(("pkg-config" ,pkg-config) | |
9fd571a2 | 123 | ("glib" ,glib "bin") ; for gtester |
12c0f32a JD |
124 | ("intltool" ,intltool))) |
125 | (home-page "http://gegl.org") | |
126 | (synopsis "Graph based image processing framework") | |
127 | (description "GEGL (Generic Graphics Library) provides infrastructure to | |
128 | do demand based cached non destructive image editing on larger than RAM | |
129 | buffers.") | |
130 | ;; The library itself is licensed under LGPL while the sample commandline | |
131 | ;; application and GUI binary gegl is licensed under GPL. | |
132 | (license (list license:lgpl3+ license:gpl3+)))) | |
133 | ||
134 | (define-public gimp | |
135 | (package | |
136 | (name "gimp") | |
4c003c5f | 137 | (version "2.10.14") |
12c0f32a JD |
138 | (source (origin |
139 | (method url-fetch) | |
9eecf9bc | 140 | (uri (string-append "https://download.gimp.org/pub/gimp/v" |
a5dd8db4 EF |
141 | (version-major+minor version) |
142 | "/gimp-" version ".tar.bz2")) | |
12c0f32a JD |
143 | (sha256 |
144 | (base32 | |
4c003c5f | 145 | "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz")))) |
12c0f32a | 146 | (build-system gnu-build-system) |
be4fbbe0 | 147 | (outputs '("out" |
b3450251 | 148 | "doc")) ; 9 MiB of gtk-doc HTML |
be4fbbe0 | 149 | (arguments |
cb4baa4d TGR |
150 | '(#:configure-flags |
151 | (list (string-append "--with-html-dir=" | |
152 | (assoc-ref %outputs "doc") | |
153 | "/share/gtk-doc/html") | |
154 | ;; ./configure requests not to annoy upstream with packaging bugs. | |
155 | "--with-bug-report-url=https://bugs.gnu.org/guix") | |
580dfc33 SB |
156 | #:phases |
157 | (modify-phases %standard-phases | |
158 | (add-after 'install 'install-sitecustomize.py | |
159 | ;; Install 'sitecustomize.py' into gimp's python directory to | |
160 | ;; add pygobject and pygtk to pygimp's search path. | |
161 | (lambda* (#:key outputs #:allow-other-keys) | |
162 | (let* ((pythonpath (getenv "PYTHONPATH")) | |
163 | (out (assoc-ref outputs "out")) | |
164 | (sitecustomize.py | |
165 | (string-append | |
166 | out "/lib/gimp/2.0/python/sitecustomize.py"))) | |
167 | (call-with-output-file sitecustomize.py | |
168 | (lambda (port) | |
169 | (format port "import site~%") | |
170 | (format port "for dir in '~a'.split(':'):~%" pythonpath) | |
171 | (format port " site.addsitedir(dir)~%"))))))))) | |
12c0f32a JD |
172 | (inputs |
173 | `(("babl" ,babl) | |
174 | ("glib" ,glib) | |
9eecf9bc | 175 | ("glib-networking" ,glib-networking) |
12c0f32a | 176 | ("libtiff" ,libtiff) |
5a8adc6d | 177 | ("libwebp" ,libwebp) |
74f99ee4 | 178 | ("libjpeg" ,libjpeg) |
12c0f32a | 179 | ("atk" ,atk) |
9eecf9bc | 180 | ("gexiv2" ,gexiv2) |
12c0f32a | 181 | ("gtk+" ,gtk+-2) |
9eecf9bc LF |
182 | ("libmypaint" ,libmypaint) |
183 | ("mypaint-brushes" ,mypaint-brushes) | |
c695fb76 TGR |
184 | ("exif" ,libexif) ; optional, EXIF + XMP support |
185 | ("lcms" ,lcms) ; optional, color management | |
186 | ("librsvg" ,librsvg) ; optional, SVG support | |
187 | ("poppler" ,poppler) ; optional, PDF support | |
9eecf9bc | 188 | ("poppler-data" ,poppler-data) |
c695fb76 TGR |
189 | ("python" ,python-2) ; optional, Python support |
190 | ("python2-pygtk" ,python2-pygtk) ; optional, Python support | |
12c0f32a JD |
191 | ("gegl" ,gegl))) |
192 | (native-inputs | |
9eecf9bc LF |
193 | `(("glib:bin" ,glib "bin") ; for glib-compile-resources and gdbus-codegen |
194 | ("pkg-config" ,pkg-config) | |
12c0f32a | 195 | ("intltool" ,intltool))) |
9eecf9bc | 196 | (home-page "https://www.gimp.org") |
66672a45 LC |
197 | (synopsis "GNU Image Manipulation Program") |
198 | (description | |
199 | "GIMP is an application for image manipulation tasks such as photo | |
200 | retouching, composition and authoring. It supports all common image formats | |
201 | as well as specialized ones. It features a highly customizable interface | |
202 | that is extensible via a plugin system.") | |
12c0f32a | 203 | (license license:gpl3+))) ; some files are lgplv3 |
1d6c6af0 RW |
204 | |
205 | (define-public gimp-fourier | |
206 | (package | |
207 | (name "gimp-fourier") | |
208 | (version "0.4.3-2") | |
209 | (source (origin | |
210 | (method url-fetch) | |
211 | (uri (string-append "http://registry.gimp.org/files/fourier-" | |
212 | version ".tar.gz")) | |
213 | (sha256 | |
214 | (base32 | |
215 | "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184")))) | |
216 | (build-system gnu-build-system) | |
217 | (arguments | |
218 | `(#:tests? #f ;no tests | |
219 | #:phases | |
220 | (modify-phases %standard-phases | |
b2086776 RW |
221 | ;; FIXME: The gegl package only installs "gegl-0.4.pc", but |
222 | ;; "gimp-2.0.pc" requires "gegl-0.3.pc", so we just copy it. | |
223 | (replace 'configure | |
224 | (lambda* (#:key inputs #:allow-other-keys) | |
225 | (mkdir-p "tmppkgconfig") | |
226 | (copy-file (string-append (assoc-ref inputs "gegl") | |
227 | "/lib/pkgconfig/gegl-0.4.pc") | |
228 | "tmppkgconfig/gegl-0.3.pc") | |
229 | (setenv "PKG_CONFIG_PATH" | |
230 | (string-append "tmppkgconfig:" | |
231 | (or (getenv "PKG_CONFIG_PATH") ""))) | |
232 | #t)) | |
1d6c6af0 RW |
233 | (add-after 'unpack 'set-prefix |
234 | (lambda* (#:key outputs #:allow-other-keys) | |
235 | ;; gimptool-2.0 does not allow us to install to any target | |
236 | ;; directory. | |
237 | (let ((target (string-append (assoc-ref outputs "out") | |
238 | "/lib/gimp/" | |
239 | (car (string-split ,(package-version gimp) #\.)) | |
240 | ".0/plug-ins"))) | |
241 | (substitute* "Makefile" | |
242 | (("\\$\\(PLUGIN_INSTALL\\) fourier") | |
243 | (string-append "cp fourier " target))) | |
244 | (mkdir-p target)) | |
245 | #t))))) | |
246 | (inputs | |
247 | `(("fftw" ,fftw) | |
248 | ("gimp" ,gimp) | |
249 | ;; needed by gimp-2.0.pc | |
250 | ("gdk-pixbuf" ,gdk-pixbuf) | |
b2086776 | 251 | ("gegl" ,gegl) |
1d6c6af0 RW |
252 | ("cairo" ,cairo) |
253 | ("glib" ,glib) | |
254 | ;; needed by gimpui-2.0.pc | |
255 | ("gtk+" ,gtk+-2))) | |
256 | (native-inputs | |
257 | `(("pkg-config" ,pkg-config))) | |
258 | (home-page "http://registry.gimp.org/node/19596") | |
259 | (synopsis "GIMP plug-in to edit image in fourier space") | |
260 | (description | |
261 | "This package provides a simple plug-in to apply the fourier transform on | |
262 | an image, allowing you to work with the transformed image inside GIMP. You | |
263 | can draw or apply filters in fourier space and get the modified image with an | |
264 | inverse fourier transform.") | |
265 | (license license:gpl3+))) | |
657687d3 LF |
266 | |
267 | (define-public libmypaint | |
268 | (package | |
269 | (name "libmypaint") | |
270 | (version "1.3.0") | |
271 | (source (origin | |
272 | (method url-fetch) | |
273 | (uri (string-append "https://github.com/mypaint/libmypaint/" | |
274 | "releases/download/v" version "/libmypaint-" | |
275 | version ".tar.xz")) | |
276 | (sha256 | |
277 | (base32 | |
278 | "0wd6jk69vmhsq1mdw96v0fh7b28n3glkr5ca466zcq7agzaxj1va")))) | |
279 | (build-system gnu-build-system) | |
280 | (native-inputs | |
281 | `(("intltool" ,intltool) | |
282 | ("pkg-config" ,pkg-config))) | |
283 | ;; As needed by 'libmypaint.pc'. | |
284 | (propagated-inputs | |
285 | `(("json-c" ,json-c) | |
286 | ("gobject-introspection" ,gobject-introspection))) | |
287 | (inputs | |
288 | `(("glib" ,glib))) | |
289 | (synopsis "Artistic brushes library") | |
290 | (description "Libmypaint, also called \"brushlib\", is a library for making | |
291 | brushstrokes which is used by MyPaint and GIMP.") | |
292 | (home-page "http://mypaint.org") | |
293 | (license license:isc))) | |
4b5c056a LF |
294 | |
295 | (define-public mypaint-brushes | |
296 | (package | |
297 | (name "mypaint-brushes") | |
298 | (version "1.3.0") | |
299 | (source (origin | |
e5bbfc7d RW |
300 | (method git-fetch) |
301 | (uri (git-reference | |
302 | (url "https://github.com/Jehan/mypaint-brushes.git") | |
303 | (commit (string-append "v" version)))) | |
304 | (file-name (git-file-name name version)) | |
4b5c056a LF |
305 | (sha256 |
306 | (base32 | |
e5bbfc7d | 307 | "1iz89z6v2mp8j1lrf942k561s8311i3s34ap36wh4rybb2lq15m0")))) |
4b5c056a LF |
308 | (build-system gnu-build-system) |
309 | (arguments | |
5686be39 | 310 | `(#:phases |
4b5c056a | 311 | (modify-phases %standard-phases |
5686be39 RW |
312 | (add-after 'unpack 'relax-dependency-version |
313 | (lambda _ | |
314 | (substitute* "autogen.sh" | |
315 | (("automake-1.13") "automake") | |
316 | (("aclocal-1.13") "aclocal")) | |
317 | #t))))) | |
4b5c056a LF |
318 | (native-inputs |
319 | `(("autoconf" ,autoconf) | |
320 | ("automake" ,automake))) | |
321 | (synopsis "Default brushes for MyPaint") | |
322 | (description "This package provides the default set of brushes for | |
323 | MyPaint.") | |
324 | (home-page "https://github.com/Jehan/mypaint-brushes") | |
325 | (license license:cc0))) | |
65b8d610 TW |
326 | |
327 | (define-public gimp-resynthesizer | |
328 | ;; GIMP does not respect any plugin search path environment variable, so after | |
329 | ;; installation users have to edit their GIMP settings to include | |
330 | ;; "$HOME/.guix-profile/lib/gimp/2.0/plug-ins/" in | |
331 | ;; “Edit->Preferences->Folders->Plug Ins”. | |
332 | (package | |
333 | (name "gimp-resynthesizer") | |
334 | (version "2.0.3") | |
335 | (source | |
336 | (origin | |
337 | (method url-fetch) | |
338 | (uri (string-append "https://github.com/bootchk/resynthesizer/archive/v" | |
339 | version ".tar.gz")) | |
340 | (sha256 | |
341 | (base32 | |
342 | "0l3404w6rqny7h3djskxf149gzx6x4qhndgbh3403c9lbh4pi1kr")) | |
343 | (file-name (string-append name "-" version ".tar.gz")))) | |
344 | (build-system gnu-build-system) | |
345 | (arguments | |
346 | `( ;; Turn off tests to avoid: | |
347 | ;; make[1]: *** No rule to make target '../src/resynth-gui.c', needed by 'resynthesizer.pot'. Stop. | |
348 | #:tests? #f | |
349 | #:phases | |
350 | (modify-phases %standard-phases | |
351 | (add-after 'unpack 'set-env | |
352 | (lambda _ | |
353 | (setenv "CONFIG_SHELL" (which "sh")) | |
354 | #t)) | |
355 | (add-after 'configure 'set-prefix | |
356 | ;; Install plugin under $prefix, not under GIMP's libdir. | |
357 | (lambda* (#:key outputs #:allow-other-keys) | |
358 | (let ((target (string-append (assoc-ref outputs "out") | |
359 | "/lib/gimp/" | |
360 | ,(version-major | |
361 | (package-version gimp)) | |
362 | ".0"))) | |
363 | (substitute* (list "src/resynthesizer/Makefile" | |
364 | "src/resynthesizer-gui/Makefile") | |
365 | (("GIMP_LIBDIR = .*") | |
366 | (string-append "GIMP_LIBDIR = " target "\n"))) | |
367 | (mkdir-p target) | |
368 | #t)))))) | |
369 | (native-inputs | |
370 | `(("autoconf" ,autoconf-wrapper) | |
371 | ("automake" ,automake) | |
372 | ("glib" ,glib "bin") ; glib-gettextize | |
373 | ("intltool" ,intltool) | |
374 | ("pkg-config" ,pkg-config))) | |
375 | (inputs | |
376 | `(("gimp" ,gimp) | |
377 | ("gdk-pixbuf" ,gdk-pixbuf) ; needed by gimp-2.0.pc | |
378 | ("cairo" ,cairo) | |
379 | ("gegl" ,gegl) | |
380 | ("gtk+" ,gtk+-2) ; needed by gimpui-2.0.pc | |
381 | ("glib" ,glib))) | |
382 | (home-page "https://github.com/bootchk/resynthesizer") | |
383 | (synopsis "GIMP plugins for texture synthesis") | |
384 | (description | |
385 | "This package provides resynthesizer plugins for GIMP, which encompasses | |
386 | tools for healing selections (content-aware fill), enlarging the canvas and | |
387 | healing the border, increasing the resolution while adding detail, and | |
f714bb3d | 388 | transferring the style of an image.") |
65b8d610 | 389 | (license license:gpl3+))) |