gimp.scm 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
  4. ;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  6. ;;; Copyright © 2018, 2020 Leo Famulari <leo@famulari.name>
  7. ;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de>
  8. ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  9. ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu packages gimp)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix git-download)
  29. #:use-module (guix utils)
  30. #:use-module ((guix licenses) #:prefix license:)
  31. #:use-module (guix build-system gnu)
  32. #:use-module (guix build-system glib-or-gtk)
  33. #:use-module (guix build-system meson)
  34. #:use-module (gnu packages)
  35. #:use-module (gnu packages algebra)
  36. #:use-module (gnu packages autotools)
  37. #:use-module (gnu packages base)
  38. #:use-module (gnu packages build-tools)
  39. #:use-module (gnu packages documentation)
  40. #:use-module (gnu packages graphviz)
  41. #:use-module (gnu packages pkg-config)
  42. #:use-module (gnu packages glib)
  43. #:use-module (gnu packages gtk)
  44. #:use-module (gnu packages gnome)
  45. #:use-module (gnu packages graphics)
  46. #:use-module (gnu packages image)
  47. #:use-module (gnu packages ghostscript)
  48. #:use-module (gnu packages compression)
  49. #:use-module (gnu packages xml)
  50. #:use-module (gnu packages linux)
  51. #:use-module (gnu packages ncurses)
  52. #:use-module (gnu packages patchutils)
  53. #:use-module (gnu packages pdf)
  54. #:use-module (gnu packages photo)
  55. #:use-module (gnu packages python)
  56. #:use-module (gnu packages web)
  57. #:use-module (gnu packages xorg))
  58. (define-public poly2tri-c
  59. (package
  60. (name "poly2tri-c")
  61. (version "0.1.0")
  62. (source
  63. (origin
  64. (method url-fetch)
  65. (uri
  66. (string-append "https://storage.googleapis.com/"
  67. "google-code-archive-source/v2/code.google.com/"
  68. "poly2tri-c/source-archive.zip"))
  69. (file-name
  70. (string-append name "-" version ".zip"))
  71. (sha256
  72. (base32 "17cw0zhbnf2gb59jm26z0wcarqgdwir9jr1fpi3v9lcvyb2s3mqj"))))
  73. (build-system glib-or-gtk-build-system)
  74. (outputs '("out" "doc"))
  75. (arguments
  76. `(#:configure-flags
  77. (list
  78. "--disable-static")
  79. #:phases
  80. (modify-phases %standard-phases
  81. (add-after 'unpack 'disable-strict-rules
  82. (lambda _
  83. (substitute* "configure.ac"
  84. (("\\$CFLAGS -Wall -ansi -pedantic")
  85. "$CFLAGS")
  86. (("\\$CFLAGS -Werror")
  87. "$CFLAGS"))
  88. #t))
  89. (add-after 'disable-strict-rules 'fix-build-errors
  90. (lambda _
  91. (substitute* "poly2tri-c/refine/Makefile.am"
  92. (("cdt.c")
  93. "rcdt.c")
  94. (("cdt.h")
  95. "rcdt.h")
  96. (("utils.c")
  97. "rutils.c")
  98. (("utils.h")
  99. "rutils.h"))
  100. #t))
  101. (add-before 'bootstrap 'configure-later
  102. (lambda _
  103. (setenv "NOCONFIGURE" "set")
  104. #t))
  105. (add-after 'build 'generate-doc
  106. (lambda _
  107. (invoke "doxygen")
  108. #t))
  109. (add-after 'install 'install-doc
  110. (lambda* (#:key outputs #:allow-other-keys)
  111. (let* ((out (assoc-ref outputs "out"))
  112. (doc (assoc-ref outputs "doc")))
  113. (copy-recursively
  114. "doc"
  115. (string-append doc "/share/doc/poly2tri-c"))
  116. #t))))))
  117. (native-inputs
  118. `(("autoconf" ,autoconf)
  119. ("automake" ,automake)
  120. ("doxygen" ,doxygen)
  121. ("libtool" ,libtool)
  122. ("pkg-config" ,pkg-config)
  123. ("unzip" ,unzip)
  124. ("which" ,which)))
  125. (propagated-inputs
  126. `(("glib" ,glib)))
  127. (synopsis "2D constrained Delaunay triangulation library")
  128. (description "Poly2Tri-C is a library for generating, refining and rendering
  129. 2-Dimensional Constrained Delaunay Triangulations.")
  130. (home-page "https://code.google.com/archive/p/poly2tri-c/")
  131. (license license:bsd-3)))
  132. (define-public mrg
  133. (package
  134. (name "mrg")
  135. (version "0.1.4")
  136. (source
  137. (origin
  138. (method git-fetch)
  139. (uri
  140. (git-reference
  141. (url "https://github.com/hodefoting/mrg")
  142. (commit version)))
  143. (file-name
  144. (git-file-name name version))
  145. (sha256
  146. (base32 "106qhh0c11576cc5kh90ds0ram72d3r6n9sadw0y4krnhap6dvwk"))))
  147. (build-system meson-build-system)
  148. (arguments
  149. `(#:glib-or-gtk? #t)) ; To wrap binaries and/or compile schemas
  150. (native-inputs
  151. `(("pkg-config" ,pkg-config)))
  152. (propagated-inputs
  153. `(("alsa" ,alsa-lib)
  154. ("cairo" ,cairo)
  155. ("gtk+" ,gtk+)
  156. ("mmm" ,mmm)
  157. ("x11" ,libx11)))
  158. (synopsis "Microraptor GUI")
  159. (description "MrG is is a C API for creating user interfaces. It can be
  160. used as an application writing environment or as an interactive canvas for part
  161. of a larger interface.")
  162. (home-page "https://github.com/hodefoting/mrg")
  163. (license license:lgpl2.0+)))
  164. (define-public babl
  165. (package
  166. (name "babl")
  167. (version "0.1.86")
  168. (source (origin
  169. (method url-fetch)
  170. (uri (list (string-append "https://download.gimp.org/pub/babl/"
  171. (version-major+minor version)
  172. "/babl-" version ".tar.xz")
  173. (string-append "https://ftp.gtk.org/pub/babl/"
  174. (version-major+minor version)
  175. "/babl-" version ".tar.xz")
  176. (string-append "ftp://ftp.gtk.org/pub/babl/"
  177. (version-major+minor version)
  178. "/babl-" version ".tar.xz")))
  179. (sha256
  180. (base32
  181. "1w68h81kqkqnziixrx21qs0gfv2z79651h19sxn226xdb58mjgqb"))))
  182. (build-system meson-build-system)
  183. (arguments
  184. `(#:configure-flags
  185. (list "-Denable-gir=false"
  186. "-Dwith-docs=false")))
  187. (native-inputs
  188. `(("pkg-config" ,pkg-config)))
  189. (propagated-inputs
  190. ;; Propagated to satisfy ‘babl.pc’.
  191. `(("lcms" ,lcms)))
  192. (home-page "https://gegl.org/babl/")
  193. (synopsis "Image pixel format conversion library")
  194. (description
  195. "Babl is a dynamic, any-to-any pixel format translation library.
  196. It allows converting between different methods of storing pixels, known as
  197. @dfn{pixel formats}, that have different bit depths and other data
  198. representations, color models, and component permutations.
  199. A vocabulary to formulate new pixel formats from existing primitives is
  200. provided, as well as a framework to add new color models and data types.")
  201. (license license:lgpl3+)))
  202. (define-public gegl
  203. (package
  204. (name "gegl")
  205. (version "0.4.30")
  206. (source (origin
  207. (method url-fetch)
  208. (uri (list (string-append "https://download.gimp.org/pub/gegl/"
  209. (string-take version 3)
  210. "/gegl-" version ".tar.xz")
  211. (string-append "https://ftp.gtk.org/pub/gegl/"
  212. (version-major+minor version)
  213. "/gegl-" version ".tar.xz")
  214. (string-append "ftp://ftp.gtk.org/pub/gegl/"
  215. (version-major+minor version)
  216. "/gegl-" version ".tar.xz")))
  217. (sha256
  218. (base32
  219. "1pd8xkx70k0fsi1hrzrmaify7112wjmxzk0p6bi6js89yhn7h4n1"))))
  220. (build-system meson-build-system)
  221. (arguments
  222. `(#:configure-flags
  223. (list "-Dintrospection=false")
  224. #:phases
  225. (modify-phases %standard-phases
  226. (add-after 'unpack 'extend-test-time-outs
  227. (lambda _
  228. ;; Multiply some poorly-chosen time-outs for busy build machines.
  229. (substitute* "tests/simple/test-node-exponential.c"
  230. (("G_TIME_SPAN_SECOND" match)
  231. (string-append "10 * " match)))
  232. (substitute* "tests/simple/test-buffer-sharing.c"
  233. (("g_timeout_add_seconds\\([0-9]+" match)
  234. (string-append match "0")))
  235. (substitute* (find-files "tests" "^meson\\.build$")
  236. (("timeout ?: [0-9]+" match)
  237. (string-append match "0")))
  238. #t)))))
  239. ;; These are propagated to satisfy 'gegl-0.4.pc'.
  240. (propagated-inputs
  241. `(("babl" ,babl)
  242. ("glib" ,glib)
  243. ("json-glib" ,json-glib)))
  244. (inputs
  245. `(("cairo" ,cairo)
  246. ("pango" ,pango)
  247. ("libpng" ,libpng)
  248. ("libjpeg" ,libjpeg-turbo)
  249. ("libraw" ,libraw)))
  250. (native-inputs
  251. `(("pkg-config" ,pkg-config)
  252. ("glib" ,glib "bin") ; for gtester
  253. ("intltool" ,intltool)))
  254. (home-page "https://gegl.org")
  255. (synopsis "Graph based image processing framework")
  256. (description "GEGL (Generic Graphics Library) provides infrastructure to
  257. do demand based cached non destructive image editing on larger than RAM
  258. buffers.")
  259. ;; The library itself is licensed under LGPL while the sample commandline
  260. ;; application and GUI binary gegl is licensed under GPL.
  261. (license (list license:lgpl3+ license:gpl3+))))
  262. (define-public gimp
  263. (package
  264. (name "gimp")
  265. (version "2.10.24")
  266. (source
  267. (origin
  268. (method url-fetch)
  269. (uri (string-append "https://download.gimp.org/pub/gimp/v"
  270. (version-major+minor version)
  271. "/gimp-" version ".tar.bz2"))
  272. (sha256
  273. (base32 "17lq6ns5qhspd171zqh76yf98xnn5n0hcl7hbhbx63cc6ribf6xx"))))
  274. (build-system gnu-build-system)
  275. (outputs '("out"
  276. "doc")) ; 9 MiB of gtk-doc HTML
  277. (arguments
  278. '(#:configure-flags
  279. (list (string-append "--with-html-dir="
  280. (assoc-ref %outputs "doc")
  281. "/share/gtk-doc/html")
  282. ;; Prevent the build system from running 'gtk-update-icon-cache'
  283. ;; which is not needed during the build because Guix runs it at
  284. ;; profile creation time.
  285. "ac_cv_path_GTK_UPDATE_ICON_CACHE=true"
  286. ;; Disable automatic network request on startup to check for
  287. ;; version updates.
  288. "--disable-check-update"
  289. ;; ./configure requests not to annoy upstream with packaging bugs.
  290. "--with-bug-report-url=https://bugs.gnu.org/guix")
  291. #:phases
  292. (modify-phases %standard-phases
  293. (add-after 'install 'install-sitecustomize.py
  294. ;; Install 'sitecustomize.py' into gimp's python directory to
  295. ;; add pygobject and pygtk to pygimp's search path.
  296. (lambda* (#:key outputs #:allow-other-keys)
  297. (let* ((pythonpath (getenv "GUIX_PYTHONPATH"))
  298. (out (assoc-ref outputs "out"))
  299. (sitecustomize.py
  300. (string-append
  301. out "/lib/gimp/2.0/python/sitecustomize.py")))
  302. (call-with-output-file sitecustomize.py
  303. (lambda (port)
  304. (format port "import site~%")
  305. (format port "for dir in '~a'.split(':'):~%" pythonpath)
  306. (format port " site.addsitedir(dir)~%")))))))))
  307. (inputs
  308. `(("babl" ,babl)
  309. ("glib" ,glib)
  310. ("glib-networking" ,glib-networking)
  311. ("libtiff" ,libtiff)
  312. ("libwebp" ,libwebp)
  313. ("libjpeg" ,libjpeg-turbo)
  314. ("atk" ,atk)
  315. ("gexiv2" ,gexiv2)
  316. ("gtk+" ,gtk+-2)
  317. ("libmypaint" ,libmypaint)
  318. ("mypaint-brushes" ,mypaint-brushes-1.3)
  319. ("exif" ,libexif) ; optional, EXIF + XMP support
  320. ("lcms" ,lcms) ; optional, color management
  321. ("librsvg" ,librsvg) ; optional, SVG support
  322. ("libxcursor" ,libxcursor) ; optional, Mouse Cursor support
  323. ("poppler" ,poppler) ; optional, PDF support
  324. ("poppler-data" ,poppler-data)
  325. ("python" ,python-2) ; optional, Python support
  326. ("python2-pygtk" ,python2-pygtk) ; optional, Python support
  327. ("gegl" ,gegl)))
  328. (native-inputs
  329. `(("glib:bin" ,glib "bin") ; for glib-compile-resources and gdbus-codegen
  330. ("pkg-config" ,pkg-config)
  331. ("intltool" ,intltool)))
  332. (home-page "https://www.gimp.org")
  333. (synopsis "GNU Image Manipulation Program")
  334. (description
  335. "GIMP is an application for image manipulation tasks such as photo
  336. retouching, composition and authoring. It supports all common image formats
  337. as well as specialized ones. It features a highly customizable interface
  338. that is extensible via a plugin system.")
  339. (license license:gpl3+))) ; some files are lgplv3
  340. (define-public gimp-fourier
  341. (package
  342. (name "gimp-fourier")
  343. (version "0.4.3-2")
  344. (source (origin
  345. (method url-fetch)
  346. (uri (string-append "http://registry.gimp.org/files/fourier-"
  347. version ".tar.gz"))
  348. (sha256
  349. (base32
  350. "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
  351. (build-system gnu-build-system)
  352. (arguments
  353. `(#:tests? #f ;no tests
  354. #:phases
  355. (modify-phases %standard-phases
  356. ;; FIXME: The gegl package only installs "gegl-0.4.pc", but
  357. ;; "gimp-2.0.pc" requires "gegl-0.3.pc", so we just copy it.
  358. (replace 'configure
  359. (lambda* (#:key inputs #:allow-other-keys)
  360. (mkdir-p "tmppkgconfig")
  361. (copy-file (search-input-file inputs
  362. "/lib/pkgconfig/gegl-0.4.pc")
  363. "tmppkgconfig/gegl-0.3.pc")
  364. (setenv "PKG_CONFIG_PATH"
  365. (string-append "tmppkgconfig:"
  366. (or (getenv "PKG_CONFIG_PATH") "")))
  367. #t))
  368. (add-after 'unpack 'set-prefix
  369. (lambda* (#:key outputs #:allow-other-keys)
  370. ;; gimptool-2.0 does not allow us to install to any target
  371. ;; directory.
  372. (let ((target (string-append (assoc-ref outputs "out")
  373. "/lib/gimp/"
  374. (car (string-split ,(package-version gimp) #\.))
  375. ".0/plug-ins")))
  376. (substitute* "Makefile"
  377. (("\\$\\(PLUGIN_INSTALL\\) fourier")
  378. (string-append "cp fourier " target)))
  379. (mkdir-p target))
  380. #t)))))
  381. (inputs
  382. `(("fftw" ,fftw)
  383. ("gimp" ,gimp)
  384. ;; needed by gimp-2.0.pc
  385. ("gdk-pixbuf" ,gdk-pixbuf)
  386. ("gegl" ,gegl)
  387. ("cairo" ,cairo)
  388. ("glib" ,glib)
  389. ;; needed by gimpui-2.0.pc
  390. ("gtk+" ,gtk+-2)))
  391. (native-inputs
  392. `(("pkg-config" ,pkg-config)))
  393. (home-page "https://www.lprp.fr/gimp_plugin_en/#fourier")
  394. (synopsis "GIMP plug-in to edit image in fourier space")
  395. (description
  396. "This package provides a simple plug-in to apply the fourier transform on
  397. an image, allowing you to work with the transformed image inside GIMP. You
  398. can draw or apply filters in fourier space and get the modified image with an
  399. inverse fourier transform.")
  400. (license license:gpl3+)))
  401. (define-public libmypaint
  402. (package
  403. (name "libmypaint")
  404. (version "1.6.1")
  405. (source (origin
  406. (method url-fetch)
  407. (uri (string-append "https://github.com/mypaint/libmypaint/"
  408. "releases/download/v" version "/libmypaint-"
  409. version ".tar.xz"))
  410. (sha256
  411. (base32
  412. "0priwpmc7dizccqvn21ig6d649bprl3xl1hmjj7nddznjgr585vl"))))
  413. (build-system gnu-build-system)
  414. (native-inputs
  415. `(("intltool" ,intltool)
  416. ("pkg-config" ,pkg-config)))
  417. ;; As needed by 'libmypaint.pc'.
  418. (propagated-inputs
  419. `(("json-c" ,json-c)
  420. ("gobject-introspection" ,gobject-introspection)))
  421. (inputs
  422. `(("glib" ,glib)))
  423. (synopsis "Artistic brushes library")
  424. (description "Libmypaint, also called \"brushlib\", is a library for making
  425. brushstrokes which is used by MyPaint and GIMP.")
  426. (home-page "http://mypaint.org")
  427. (license license:isc)))
  428. (define-public mypaint-brushes
  429. (package
  430. (name "mypaint-brushes")
  431. (version "2.0.2")
  432. (source
  433. (origin
  434. (method git-fetch)
  435. (uri (git-reference
  436. (url "https://github.com/mypaint/mypaint-brushes")
  437. (commit (string-append "v" version))))
  438. (file-name (git-file-name name version))
  439. (sha256
  440. (base32 "0kcqz13vzpy24dhmrx9hbs6s7hqb8y305vciznm15h277sabpmw9"))))
  441. (build-system gnu-build-system)
  442. (native-inputs
  443. `(("autoconf" ,autoconf)
  444. ("automake" ,automake)))
  445. (synopsis "Default brushes for MyPaint")
  446. (description "This package provides the default set of brushes for
  447. MyPaint.")
  448. (home-page "https://github.com/mypaint/mypaint-brushes/")
  449. ;; Scripts are distributed under GPL2+ terms, brushes are provided as
  450. ;; public domain or under CC0 terms.
  451. (license (list license:gpl2+ license:cc0 license:public-domain))))
  452. (define-public mypaint-brushes-1.3
  453. (package
  454. (inherit mypaint-brushes)
  455. (name "mypaint-brushes")
  456. (version "1.3.1")
  457. (source
  458. (origin
  459. (method git-fetch)
  460. (uri (git-reference
  461. (url "https://github.com/mypaint/mypaint-brushes")
  462. (commit (string-append "v" version))))
  463. (file-name (git-file-name name version))
  464. (sha256
  465. (base32 "1c95l1vfz7sbrdlzrbz7h1p6s1k113kyjfd9wfnxlm0p6562cz3j"))))))
  466. (define-public gimp-resynthesizer
  467. ;; GIMP does not respect any plugin search path environment variable, so after
  468. ;; installation users have to edit their GIMP settings to include
  469. ;; "$HOME/.guix-profile/lib/gimp/2.0/plug-ins/" in
  470. ;; “Edit->Preferences->Folders->Plug Ins”.
  471. (package
  472. (name "gimp-resynthesizer")
  473. (version "2.0.3")
  474. (source
  475. (origin
  476. (method git-fetch)
  477. (uri (git-reference
  478. (url "https://github.com/bootchk/resynthesizer")
  479. (commit (string-append "v" version))))
  480. (sha256
  481. (base32
  482. "1jwc8bhhm21xhrgw56nzbma6fwg59gc8anlmyns7jdiw83y0zx3j"))
  483. (file-name (git-file-name name version))))
  484. (build-system gnu-build-system)
  485. (arguments
  486. `( ;; Turn off tests to avoid:
  487. ;; make[1]: *** No rule to make target '../src/resynth-gui.c', needed by 'resynthesizer.pot'. Stop.
  488. #:tests? #f
  489. #:phases
  490. (modify-phases %standard-phases
  491. (add-after 'unpack 'set-env
  492. (lambda _
  493. (setenv "CONFIG_SHELL" (which "sh"))
  494. #t))
  495. (add-after 'configure 'set-prefix
  496. ;; Install plugin under $prefix, not under GIMP's libdir.
  497. (lambda* (#:key outputs #:allow-other-keys)
  498. (let ((target (string-append (assoc-ref outputs "out")
  499. "/lib/gimp/"
  500. ,(version-major
  501. (package-version gimp))
  502. ".0")))
  503. (substitute* (list "src/resynthesizer/Makefile"
  504. "src/resynthesizer-gui/Makefile")
  505. (("GIMP_LIBDIR = .*")
  506. (string-append "GIMP_LIBDIR = " target "\n")))
  507. (mkdir-p target)
  508. #t))))))
  509. (native-inputs
  510. ;; avoid ./autogen.sh: ./configure: /bin/sh: bad interpreter:
  511. ;; No such file or directory
  512. `(("autoconf" ,autoconf-wrapper)
  513. ("automake" ,automake)
  514. ("glib" ,glib "bin") ; glib-gettextize
  515. ("intltool" ,intltool)
  516. ("pkg-config" ,pkg-config)))
  517. (inputs
  518. `(("gimp" ,gimp)
  519. ("gdk-pixbuf" ,gdk-pixbuf) ; needed by gimp-2.0.pc
  520. ("cairo" ,cairo)
  521. ("gegl" ,gegl)
  522. ("gtk+" ,gtk+-2) ; needed by gimpui-2.0.pc
  523. ("glib" ,glib)))
  524. (home-page "https://github.com/bootchk/resynthesizer")
  525. (synopsis "GIMP plugins for texture synthesis")
  526. (description
  527. "This package provides resynthesizer plugins for GIMP, which encompasses
  528. tools for healing selections (content-aware fill), enlarging the canvas and
  529. healing the border, increasing the resolution while adding detail, and
  530. transferring the style of an image.")
  531. (license license:gpl3+)))
  532. (define gegl-for-glimpse
  533. ;; Remove this when GIMP commit 2cae9b9acf9da98c4c9990819ffbd5aabe23017e
  534. ;; makes it into Glimpse.
  535. (package
  536. (inherit gegl)
  537. (arguments
  538. (substitute-keyword-arguments (package-arguments gegl)
  539. ((#:phases phases)
  540. `(modify-phases ,phases
  541. (add-after 'unpack 'refer-to-dot
  542. ;; XXX Without ‘dot’ in $PATH, Glimpse would fail to start with an
  543. ;; extremely obtuse ‘GEGL operation missing!’ error.
  544. (lambda _
  545. (substitute* "gegl/gegl-dot.c"
  546. (("\"dot ")
  547. (format #f "\"~a " (which "dot"))))
  548. (substitute* "operations/common/introspect.c"
  549. (("g_find_program_in_path \\(\"dot\"\\)")
  550. (format #f "g_strdup (\"~a\")" (which "dot"))))))))))
  551. (inputs
  552. `(,@(package-inputs gegl)
  553. ("graphviz" ,graphviz)))))
  554. (define-public glimpse
  555. (package
  556. (name "glimpse")
  557. (version "0.2.0")
  558. (source (origin
  559. (method git-fetch)
  560. (uri (git-reference
  561. (url "https://github.com/glimpse-editor/Glimpse")
  562. (commit (string-append "v" version))))
  563. (file-name (git-file-name name version))
  564. (sha256
  565. (base32
  566. "0drngj2xqzxfaag6pc4xjffiw003n4y43x5rb5bf4ziv1ac51dm9"))))
  567. (build-system gnu-build-system)
  568. (outputs '("out"
  569. "doc")) ; 9 MiB of gtk-doc HTML
  570. (arguments
  571. '(#:configure-flags
  572. (list (string-append "--with-html-dir="
  573. (assoc-ref %outputs "doc")
  574. "/share/gtk-doc/html")
  575. "--enable-gtk-doc"
  576. ;; Prevent the build system from running 'gtk-update-icon-cache'
  577. ;; which is not needed during the build because Guix runs it at
  578. ;; profile creation time.
  579. "ac_cv_path_GTK_UPDATE_ICON_CACHE=true"
  580. ;; Disable automatic network request on startup to check for
  581. ;; version updates.
  582. "--disable-check-update"
  583. ;; ./configure requests not to annoy upstream with packaging bugs.
  584. "--with-bug-report-url=https://bugs.gnu.org/guix")
  585. #:phases
  586. (modify-phases %standard-phases
  587. (add-after 'install 'install-sitecustomize.py
  588. ;; Install 'sitecustomize.py' into glimpse's python directory to
  589. ;; add pygobject and pygtk to pygimp's search path.
  590. (lambda* (#:key outputs #:allow-other-keys)
  591. (let* ((pythonpath (getenv "GUIX_PYTHONPATH"))
  592. (out (assoc-ref outputs "out"))
  593. (sitecustomize.py
  594. (string-append
  595. out "/lib/glimpse/2.0/python/sitecustomize.py")))
  596. (call-with-output-file sitecustomize.py
  597. (lambda (port)
  598. (format port "import site~%")
  599. (format port "for dir in '~a'.split(':'):~%" pythonpath)
  600. (format port " site.addsitedir(dir)~%")))))))))
  601. (native-inputs
  602. `(("autoconf" ,autoconf)
  603. ("automake" ,automake)
  604. ("gtk-doc" ,gtk-doc)
  605. ("intltool" ,intltool)
  606. ("libtool" ,libtool)
  607. ("libxslt" ,libxslt) ; for xsltproc
  608. ("pkg-config" ,pkg-config)
  609. ("glib:bin" ,glib "bin"))) ; for gdbus-codegen
  610. (inputs
  611. `(("babl" ,babl)
  612. ("glib" ,glib)
  613. ("glib-networking" ,glib-networking)
  614. ("libtiff" ,libtiff)
  615. ("libwebp" ,libwebp)
  616. ("libjpeg" ,libjpeg-turbo)
  617. ("atk" ,atk)
  618. ("gexiv2" ,gexiv2)
  619. ("gtk+" ,gtk+-2)
  620. ("libmypaint" ,libmypaint)
  621. ("mypaint-brushes" ,mypaint-brushes-1.3)
  622. ("exif" ,libexif) ; optional, EXIF + XMP support
  623. ("lcms" ,lcms) ; optional, color management
  624. ("librsvg" ,librsvg) ; optional, SVG support
  625. ("libxcursor" ,libxcursor) ; optional, Mouse Cursor support
  626. ("poppler" ,poppler) ; optional, PDF support
  627. ("poppler-data" ,poppler-data)
  628. ("python" ,python-2) ; optional, Python support
  629. ("python2-pygtk" ,python2-pygtk) ; optional, Python support
  630. ("gegl" ,gegl-for-glimpse))) ; XXX see comment in gegl-for-glimpse
  631. (home-page "https://glimpse-editor.github.io/")
  632. (synopsis "Glimpse Image Editor")
  633. (description "The Glimpse Image Editor is an application for image
  634. manipulation tasks such as photo retouching, composition and authoring.
  635. It supports all common image formats as well as specialized ones. It
  636. features a highly customizable interface that is extensible via a plugin
  637. system. It was forked from the GNU Image Manipulation Program.")
  638. (license license:gpl3+)))