| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 |
|
| 31 | (define-module (gnu packages gimp)
|
| 32 | #:use-module (guix packages)
|
| 33 | #:use-module (guix deprecation)
|
| 34 | #:use-module (guix download)
|
| 35 | #:use-module (guix gexp)
|
| 36 | #:use-module (guix git-download)
|
| 37 | #:use-module (guix utils)
|
| 38 | #:use-module ((guix licenses) #:prefix license:)
|
| 39 | #:use-module (guix build-system gnu)
|
| 40 | #:use-module (guix build-system glib-or-gtk)
|
| 41 | #:use-module (guix build-system meson)
|
| 42 | #:use-module (gnu packages)
|
| 43 | #:use-module (gnu packages algebra)
|
| 44 | #:use-module (gnu packages autotools)
|
| 45 | #:use-module (gnu packages backup)
|
| 46 | #:use-module (gnu packages base)
|
| 47 | #:use-module (gnu packages bash)
|
| 48 | #:use-module (gnu packages build-tools)
|
| 49 | #:use-module (gnu packages compression)
|
| 50 | #:use-module (gnu packages documentation)
|
| 51 | #:use-module (gnu packages fontutils)
|
| 52 | #:use-module (gnu packages freedesktop)
|
| 53 | #:use-module (gnu packages gettext)
|
| 54 | #:use-module (gnu packages ghostscript)
|
| 55 | #:use-module (gnu packages glib)
|
| 56 | #:use-module (gnu packages gnome)
|
| 57 | #:use-module (gnu packages graphics)
|
| 58 | #:use-module (gnu packages graphviz)
|
| 59 | #:use-module (gnu packages gtk)
|
| 60 | #:use-module (gnu packages image)
|
| 61 | #:use-module (gnu packages linux)
|
| 62 | #:use-module (gnu packages maths)
|
| 63 | #:use-module (gnu packages ncurses)
|
| 64 | #:use-module (gnu packages patchutils)
|
| 65 | #:use-module (gnu packages pdf)
|
| 66 | #:use-module (gnu packages photo)
|
| 67 | #:use-module (gnu packages pkg-config)
|
| 68 | #:use-module (gnu packages python)
|
| 69 | #:use-module (gnu packages sdl)
|
| 70 | #:use-module (gnu packages web)
|
| 71 | #:use-module (gnu packages xml)
|
| 72 | #:use-module (gnu packages xorg))
|
| 73 |
|
| 74 | (define-public poly2tri-c
|
| 75 | (package
|
| 76 | (name "poly2tri-c")
|
| 77 | (version "0.1.0")
|
| 78 | (source
|
| 79 | (origin
|
| 80 | (method url-fetch)
|
| 81 | (uri
|
| 82 | (string-append "https://storage.googleapis.com/"
|
| 83 | "google-code-archive-source/v2/code.google.com/"
|
| 84 | "poly2tri-c/source-archive.zip"))
|
| 85 | (file-name
|
| 86 | (string-append name "-" version ".zip"))
|
| 87 | (sha256
|
| 88 | (base32 "17cw0zhbnf2gb59jm26z0wcarqgdwir9jr1fpi3v9lcvyb2s3mqj"))))
|
| 89 | (build-system glib-or-gtk-build-system)
|
| 90 | (outputs '("out" "doc"))
|
| 91 | (arguments
|
| 92 | `(#:configure-flags
|
| 93 | (list
|
| 94 | "--disable-static")
|
| 95 | #:phases
|
| 96 | (modify-phases %standard-phases
|
| 97 | (add-after 'unpack 'disable-strict-rules
|
| 98 | (lambda _
|
| 99 | (substitute* "configure.ac"
|
| 100 | (("\\$CFLAGS -Wall -ansi -pedantic")
|
| 101 | "$CFLAGS")
|
| 102 | (("\\$CFLAGS -Werror")
|
| 103 | "$CFLAGS"))
|
| 104 | #t))
|
| 105 | (add-after 'disable-strict-rules 'fix-build-errors
|
| 106 | (lambda _
|
| 107 | (substitute* "poly2tri-c/refine/Makefile.am"
|
| 108 | (("cdt.c")
|
| 109 | "rcdt.c")
|
| 110 | (("cdt.h")
|
| 111 | "rcdt.h")
|
| 112 | (("utils.c")
|
| 113 | "rutils.c")
|
| 114 | (("utils.h")
|
| 115 | "rutils.h"))
|
| 116 | #t))
|
| 117 | (add-before 'bootstrap 'configure-later
|
| 118 | (lambda _
|
| 119 | (setenv "NOCONFIGURE" "set")
|
| 120 | #t))
|
| 121 | (add-after 'build 'generate-doc
|
| 122 | (lambda _
|
| 123 | (invoke "doxygen")
|
| 124 | #t))
|
| 125 | (add-after 'install 'install-doc
|
| 126 | (lambda* (#:key outputs #:allow-other-keys)
|
| 127 | (let* ((out (assoc-ref outputs "out"))
|
| 128 | (doc (assoc-ref outputs "doc")))
|
| 129 | (copy-recursively
|
| 130 | "doc"
|
| 131 | (string-append doc "/share/doc/poly2tri-c"))
|
| 132 | #t))))))
|
| 133 | (native-inputs
|
| 134 | (list autoconf
|
| 135 | automake
|
| 136 | doxygen
|
| 137 | libtool
|
| 138 | pkg-config
|
| 139 | unzip
|
| 140 | which))
|
| 141 | (propagated-inputs
|
| 142 | (list glib))
|
| 143 | (synopsis "2D constrained Delaunay triangulation library")
|
| 144 | (description "Poly2Tri-C is a library for generating, refining and rendering
|
| 145 | 2-Dimensional Constrained Delaunay Triangulations.")
|
| 146 | (home-page "https://code.google.com/archive/p/poly2tri-c/")
|
| 147 | (license license:bsd-3)))
|
| 148 |
|
| 149 | (define-public babl
|
| 150 | (package
|
| 151 | (name "babl")
|
| 152 | (version "0.1.128")
|
| 153 | (source (origin
|
| 154 | (method url-fetch)
|
| 155 | (uri (list (string-append "https://download.gimp.org/pub/babl/"
|
| 156 | (version-major+minor version)
|
| 157 | "/babl-" version ".tar.xz")
|
| 158 | (string-append "https://ftp.gtk.org/pub/babl/"
|
| 159 | (version-major+minor version)
|
| 160 | "/babl-" version ".tar.xz")
|
| 161 | (string-append "ftp://ftp.gtk.org/pub/babl/"
|
| 162 | (version-major+minor version)
|
| 163 | "/babl-" version ".tar.xz")))
|
| 164 | (sha256
|
| 165 | (base32
|
| 166 | "0gp7rdqij7sax5ppvakbaf3xgnzaq5fl29w6vd4lsh8x89xm0xp6"))))
|
| 167 | (build-system meson-build-system)
|
| 168 | (arguments
|
| 169 | (list
|
| 170 | #:configure-flags #~(list "-Dwith-docs=false")
|
| 171 | #:phases
|
| 172 | #~(modify-phases %standard-phases
|
| 173 | #$@(if (target-aarch64?)
|
| 174 | #~((add-after 'unpack 'disable-failing-test
|
| 175 | (lambda _
|
| 176 | (substitute* "tests/meson.build"
|
| 177 | |
| 178 | (("'float-to-8bit',") "")))))
|
| 179 | '()))))
|
| 180 | (native-inputs
|
| 181 | (list gobject-introspection pkg-config vala))
|
| 182 | (propagated-inputs
|
| 183 | |
| 184 | (list lcms))
|
| 185 | (home-page "https://gegl.org/babl/")
|
| 186 | (synopsis "Image pixel format conversion library")
|
| 187 | (description
|
| 188 | "Babl is a dynamic, any-to-any pixel format translation library.
|
| 189 | It allows converting between different methods of storing pixels, known as
|
| 190 | @dfn{pixel formats}, that have different bit depths and other data
|
| 191 | representations, color models, and component permutations.
|
| 192 |
|
| 193 | A vocabulary to formulate new pixel formats from existing primitives is
|
| 194 | provided, as well as a framework to add new color models and data types.")
|
| 195 | (license license:lgpl3+)))
|
| 196 |
|
| 197 | (define-public gegl
|
| 198 | (package
|
| 199 | (name "gegl")
|
| 200 | (version "0.4.72")
|
| 201 | (source
|
| 202 | (origin
|
| 203 | (method url-fetch)
|
| 204 | (uri (list (string-append "https://download.gimp.org/pub/gegl/"
|
| 205 | (string-take version 3)
|
| 206 | "/gegl-" version ".tar.xz")
|
| 207 | (string-append "https://ftp.gtk.org/pub/gegl/"
|
| 208 | (version-major+minor version)
|
| 209 | "/gegl-" version ".tar.xz")
|
| 210 | (string-append "ftp://ftp.gtk.org/pub/gegl/"
|
| 211 | (version-major+minor version)
|
| 212 | "/gegl-" version ".tar.xz")))
|
| 213 | (sha256
|
| 214 | (base32 "0vcmrsc7fipc7i7wjf9lbdmw9cla27hbmfjxrr7csvmm3pfqrfyc"))))
|
| 215 | (build-system meson-build-system)
|
| 216 | (arguments
|
| 217 | `(#:configure-flags
|
| 218 | |
| 219 | '("--wrap-mode=nodownload")
|
| 220 | #:phases
|
| 221 | (modify-phases %standard-phases
|
| 222 | (add-after 'unpack 'extend-test-time-outs
|
| 223 | (lambda _
|
| 224 | |
| 225 | (substitute* "tests/simple/test-node-exponential.c"
|
| 226 | (("G_TIME_SPAN_SECOND" match)
|
| 227 | (string-append "10 * " match)))
|
| 228 | (substitute* "tests/simple/test-buffer-sharing.c"
|
| 229 | (("g_timeout_add_seconds\\([0-9]+" match)
|
| 230 | (string-append match "0")))
|
| 231 | (substitute* (find-files "tests" "^meson\\.build$")
|
| 232 | (("timeout ?: [0-9]+" match)
|
| 233 | (string-append match "0"))))))))
|
| 234 | |
| 235 | (propagated-inputs
|
| 236 | (list babl glib json-glib))
|
| 237 | (inputs
|
| 238 | |
| 239 | (list cairo
|
| 240 | gdk-pixbuf
|
| 241 | gexiv2
|
| 242 | jasper
|
| 243 | libjpeg-turbo
|
| 244 | libnsgif
|
| 245 | libpng
|
| 246 | libraw
|
| 247 | (librsvg-for-system)
|
| 248 | libspiro
|
| 249 | libtiff
|
| 250 | libwebp
|
| 251 | maxflow
|
| 252 | openexr
|
| 253 | pango
|
| 254 | poppler
|
| 255 | sdl2))
|
| 256 | (native-inputs
|
| 257 | (list `(,glib "bin") |
| 258 | gobject-introspection
|
| 259 | intltool
|
| 260 | pkg-config
|
| 261 | vala))
|
| 262 | (home-page "https://gegl.org")
|
| 263 | (synopsis "Graph based image processing framework")
|
| 264 | (description "GEGL (Generic Graphics Library) provides infrastructure to
|
| 265 | do demand based cached non destructive image editing on larger than RAM
|
| 266 | buffers.")
|
| 267 | |
| 268 | |
| 269 | (license (list license:lgpl3+ license:gpl3+))))
|
| 270 |
|
| 271 | (define-public gimp
|
| 272 | (package
|
| 273 | (name "gimp")
|
| 274 | (version "3.2.6")
|
| 275 | (source
|
| 276 | (origin
|
| 277 | (method url-fetch)
|
| 278 | (uri (string-append "https://download.gimp.org/pub/gimp/v"
|
| 279 | (version-major+minor version)
|
| 280 | "/gimp-" version ".tar.xz"))
|
| 281 | (sha256
|
| 282 | (base32 "1n4cl9h4i04jnk2klh9p9z1aazw4m5z4cg6sfqdn630cmn85xca0"))))
|
| 283 | (build-system meson-build-system)
|
| 284 | (outputs '("out" "doc"))
|
| 285 | (arguments
|
| 286 | (list #:modules `((ice-9 popen)
|
| 287 | (ice-9 rdelim)
|
| 288 | (guix build meson-build-system)
|
| 289 | (guix build utils))
|
| 290 | |
| 291 | #:test-options #~(list "--no-suite=desktop")
|
| 292 | #:phases
|
| 293 | #~(modify-phases %standard-phases
|
| 294 | (add-after 'unpack 'remove-gcc-reference
|
| 295 | |
| 296 | (lambda _
|
| 297 | (let* ((port (open-input-pipe "gcc -v 2>&1 | tail -n 1"))
|
| 298 | (cc-version (read-line port)))
|
| 299 | (close-pipe port)
|
| 300 | (substitute* "app/gimp-version.c"
|
| 301 | (("CC_VERSION") (string-append "\"" cc-version "\""))))))
|
| 302 | (add-after 'install 'move-doc
|
| 303 | (lambda _
|
| 304 | (mkdir-p (string-append #$output:doc "/share"))
|
| 305 | (rename-file (string-append #$output "/share/doc")
|
| 306 | (string-append #$output:doc "/share/doc"))))
|
| 307 | (add-after 'install 'wrap
|
| 308 | (lambda* _
|
| 309 | (for-each
|
| 310 | (lambda (prog)
|
| 311 | (wrap-program prog
|
| 312 | |
| 313 | |
| 314 | |
| 315 | `("GI_TYPELIB_PATH" prefix
|
| 316 | (,(getenv "GI_TYPELIB_PATH")
|
| 317 | ,(string-append #$output "/lib/girepository-1.0")))
|
| 318 | `("GUIX_PYTHONPATH" prefix
|
| 319 | (,(getenv "GUIX_PYTHONPATH")))
|
| 320 | `("GDK_PIXBUF_MODULE_FILE" =
|
| 321 | (,(getenv "GDK_PIXBUF_MODULE_FILE")))
|
| 322 | `("XDG_DATA_DIRS" prefix
|
| 323 | (,(string-append #$(this-package-input "gtk+")
|
| 324 | "/share")
|
| 325 | ,(string-append #$(this-package-native-input
|
| 326 | "shared-mime-info")
|
| 327 | "/share")))))
|
| 328 | (find-files (string-append #$output "/bin")
|
| 329 | (lambda (_ stat)
|
| 330 | (eq? 'regular (stat:type stat))))))))))
|
| 331 | (inputs
|
| 332 | (list appstream
|
| 333 | bash-minimal
|
| 334 | libjxl
|
| 335 | libxmu
|
| 336 | libxt
|
| 337 | python
|
| 338 | python-pycairo
|
| 339 | python-pygobject-3.50
|
| 340 | gjs
|
| 341 | libxslt
|
| 342 | xdg-utils
|
| 343 | at-spi2-core
|
| 344 | babl
|
| 345 | gegl
|
| 346 | gexiv2-0.14
|
| 347 | glib
|
| 348 | glib-networking
|
| 349 | gtk+
|
| 350 | libjpeg-turbo
|
| 351 | libmypaint
|
| 352 | libtiff
|
| 353 | libwebp
|
| 354 | mypaint-brushes
|
| 355 | libexif |
| 356 | ghostscript |
| 357 | lcms |
| 358 | libheif |
| 359 | libmng |
| 360 | libxpm |
| 361 | (librsvg-for-system) |
| 362 | libxcursor |
| 363 | openexr |
| 364 | openjpeg |
| 365 | poppler |
| 366 | poppler-data)) |
| 367 | (native-inputs
|
| 368 | (list appstream-glib
|
| 369 | gi-docgen
|
| 370 | libarchive
|
| 371 | shared-mime-info
|
| 372 | desktop-file-utils
|
| 373 | `(,glib "bin") |
| 374 | intltool
|
| 375 | pkg-config))
|
| 376 | (home-page "https://www.gimp.org")
|
| 377 | (synopsis "GNU Image Manipulation Program")
|
| 378 | |
| 379 | (properties '((lint-hidden-cve . (list "CVE-2025-8672"))))
|
| 380 | (description
|
| 381 | "GIMP is an application for image manipulation tasks such as photo
|
| 382 | retouching, composition and authoring. It supports all common image formats
|
| 383 | as well as specialized ones. It features a highly customizable interface
|
| 384 | that is extensible via a plugin system.")
|
| 385 | (license license:gpl3+))) |
| 386 |
|
| 387 | |
| 388 | (define-deprecated/public-alias gimp-3 gimp)
|
| 389 |
|
| 390 | (define-public libmypaint
|
| 391 | (package
|
| 392 | (name "libmypaint")
|
| 393 | (version "1.6.1")
|
| 394 | (source
|
| 395 | (origin
|
| 396 | (method git-fetch)
|
| 397 | (uri (git-reference
|
| 398 | (url "https://github.com/mypaint/libmypaint")
|
| 399 | (commit (string-append "v" version))))
|
| 400 | (file-name (git-file-name name version))
|
| 401 | (sha256
|
| 402 | (base32 "1ppgpmnhph9h8ayx9776f79a0bxbdszfw9c6bw7c3ffy2yk40178"))))
|
| 403 | (build-system gnu-build-system)
|
| 404 | (arguments
|
| 405 | (list
|
| 406 | #:phases
|
| 407 | #~(modify-phases %standard-phases
|
| 408 | (add-before 'bootstrap 'overwrite-automake-and-aclocal-versions
|
| 409 | (lambda _
|
| 410 | (setenv "AUTOMAKE" "automake")
|
| 411 | (setenv "ACLOCAL" "aclocal"))))))
|
| 412 | (native-inputs
|
| 413 | (list autoconf
|
| 414 | automake
|
| 415 | intltool
|
| 416 | libtool
|
| 417 | pkg-config
|
| 418 | python))
|
| 419 | |
| 420 | (propagated-inputs
|
| 421 | (list json-c gobject-introspection))
|
| 422 | (inputs
|
| 423 | (list glib))
|
| 424 | (synopsis "Artistic brushes library")
|
| 425 | (description "Libmypaint, also called \"brushlib\", is a library for making
|
| 426 | brushstrokes which is used by MyPaint and GIMP.")
|
| 427 | (home-page "http://mypaint.org")
|
| 428 | (license license:isc)))
|
| 429 |
|
| 430 | |
| 431 | (define-public libmypaint-next
|
| 432 | (package
|
| 433 | (inherit libmypaint)
|
| 434 | (name "libmypaint")
|
| 435 | (properties '((commit . "551dfb9ca5d2b82f2361a5a8a9e7f386f35fd320")
|
| 436 | (revision . "0")))
|
| 437 | (version (git-version "1.6.1"
|
| 438 | (assoc-ref properties 'revision)
|
| 439 | (assoc-ref properties 'commit)))
|
| 440 | (source
|
| 441 | (origin
|
| 442 | (method git-fetch)
|
| 443 | (uri (git-reference
|
| 444 | (url "https://github.com/mypaint/libmypaint")
|
| 445 | (commit (assoc-ref properties 'commit))))
|
| 446 | (file-name (git-file-name name version))
|
| 447 | (sha256
|
| 448 | (base32 "0pl8cma6gfkrqx364fs1xw7f491f7y6pzxqjq1cdqlrf9r8gg0sk"))))))
|
| 449 |
|
| 450 | (define-public mypaint-brushes
|
| 451 | (package
|
| 452 | (name "mypaint-brushes")
|
| 453 | (version "2.0.2")
|
| 454 | (source
|
| 455 | (origin
|
| 456 | (method git-fetch)
|
| 457 | (uri (git-reference
|
| 458 | (url "https://github.com/mypaint/mypaint-brushes")
|
| 459 | (commit (string-append "v" version))))
|
| 460 | (file-name (git-file-name name version))
|
| 461 | (sha256
|
| 462 | (base32 "0kcqz13vzpy24dhmrx9hbs6s7hqb8y305vciznm15h277sabpmw9"))))
|
| 463 | (build-system gnu-build-system)
|
| 464 | (native-inputs
|
| 465 | (list autoconf automake))
|
| 466 | (synopsis "Default brushes for MyPaint")
|
| 467 | (description "This package provides the default set of brushes for
|
| 468 | MyPaint.")
|
| 469 | (home-page "https://github.com/mypaint/mypaint-brushes/")
|
| 470 | |
| 471 | |
| 472 | (license (list license:gpl2+ license:cc0 license:public-domain))))
|
| 473 |
|
| 474 | (define-public gimp-resynthesizer
|
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | (package
|
| 480 | (name "gimp-resynthesizer")
|
| 481 | (version "3.0.1")
|
| 482 | (source
|
| 483 | (origin
|
| 484 | (method git-fetch)
|
| 485 | (uri (git-reference
|
| 486 | (url "https://github.com/bootchk/resynthesizer")
|
| 487 | (commit (string-append "v" version))))
|
| 488 | (sha256
|
| 489 | (base32
|
| 490 | "0wzfbixx905pyspfimhk3kbcz2rgqspjwi2cz49bznx764mvr7yw"))
|
| 491 | (file-name (git-file-name name version))))
|
| 492 | (build-system meson-build-system)
|
| 493 | (native-inputs
|
| 494 | (list gettext-minimal pkg-config))
|
| 495 | (inputs
|
| 496 | (list cairo
|
| 497 | gdk-pixbuf
|
| 498 | gegl
|
| 499 | gexiv2-0.14
|
| 500 | gimp
|
| 501 | gtk+
|
| 502 | pango))
|
| 503 | (home-page "https://github.com/bootchk/resynthesizer")
|
| 504 | (synopsis "GIMP plugins for texture synthesis")
|
| 505 | (description
|
| 506 | "This package provides resynthesizer plugins for GIMP, which encompasses
|
| 507 | tools for healing selections (content-aware fill), enlarging the canvas and
|
| 508 | healing the border, increasing the resolution while adding detail, and
|
| 509 | transferring the style of an image.")
|
| 510 | (license license:gpl3+)))
|