Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
CommitLineData
3a08a411
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
e4dbe0cd 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
bc915629 4;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
b38e45d8 5;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
a6035fc1 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
136770c9 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
dfbce50c 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3bc45449 9;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
c900f843 10;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
698ec949 11;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
8c2a6183 12;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
b7807bb2 13;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
3c8ba11a 14;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
9b381643 15;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
3c986a7d 16;;; Copyright © 2016 Nikita <nikita@n0.is>
82862153 17;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
88634772 18;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
869b63cb 19;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
4e028d7a 20;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
81583442 21;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
50ee7e93 22;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
a32ecb50 23;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
4ad7e7e6 24;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
d2793ed6 25;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
6eee2f7b 26;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
3a08a411
AE
27;;;
28;;; This file is part of GNU Guix.
29;;;
30;;; GNU Guix is free software; you can redistribute it and/or modify it
31;;; under the terms of the GNU General Public License as published by
32;;; the Free Software Foundation; either version 3 of the License, or (at
33;;; your option) any later version.
34;;;
35;;; GNU Guix is distributed in the hope that it will be useful, but
36;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38;;; GNU General Public License for more details.
39;;;
40;;; You should have received a copy of the GNU General Public License
41;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42
43(define-module (gnu packages gtk)
b5b73a82 44 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 45 #:use-module (guix utils)
3a08a411
AE
46 #:use-module (guix packages)
47 #:use-module (guix download)
a9276c12 48 #:use-module (guix git-download)
2223cbde 49 #:use-module (guix build-system glib-or-gtk)
3a08a411 50 #:use-module (guix build-system gnu)
bba29e10 51 #:use-module (guix build-system meson)
4e028d7a 52 #:use-module (guix build-system perl)
0b96fb2a 53 #:use-module (guix build-system python)
e926ba71 54 #:use-module (guix build-system waf)
b837e658 55 #:use-module (gnu packages)
3bc45449 56 #:use-module (gnu packages algebra)
1a51fe27 57 #:use-module (gnu packages autotools)
61af2675 58 #:use-module (gnu packages base)
1a51fe27 59 #:use-module (gnu packages texinfo)
136770c9 60 #:use-module (gnu packages check)
6131c43d 61 #:use-module (gnu packages compression)
3bc45449 62 #:use-module (gnu packages docbook)
9c0c77f8 63 #:use-module (gnu packages enchant)
6131c43d 64 #:use-module (gnu packages fontutils)
982b3574 65 #:use-module (gnu packages freedesktop)
13236d30 66 #:use-module (gnu packages fribidi)
3bc45449 67 #:use-module (gnu packages gettext)
6131c43d 68 #:use-module (gnu packages ghostscript)
31b254a3 69 #:use-module (gnu packages gl)
3a08a411 70 #:use-module (gnu packages glib)
95d439b2 71 #:use-module (gnu packages gnome)
a2609b41 72 #:use-module (gnu packages icu4c)
e55354b8 73 #:use-module (gnu packages image)
9b381643 74 #:use-module (gnu packages libffi)
2ea3bfe7 75 #:use-module (gnu packages linux)
6131c43d 76 #:use-module (gnu packages pdf)
8b79a547 77 #:use-module (gnu packages perl)
6131c43d 78 #:use-module (gnu packages pkg-config)
3bc45449 79 #:use-module (gnu packages pretty-print)
6131c43d 80 #:use-module (gnu packages python)
44d10b1f 81 #:use-module (gnu packages python-xyz)
8e70e6d2 82 #:use-module (gnu packages guile)
0791437f 83 #:use-module (gnu packages guile-xyz)
37cb3a69 84 #:use-module (gnu packages cups)
8e70e6d2 85 #:use-module (gnu packages xml)
6c0e878e 86 #:use-module (gnu packages xorg)
56a88478
EF
87 #:use-module (gnu packages xdisorg)
88 #:use-module (srfi srfi-1)
897186c1
LC
89 #:use-module (srfi srfi-26)
90 #:use-module (ice-9 match))
3a08a411
AE
91
92(define-public atk
93 (package
94 (name "atk")
336cf4e7 95 (version "2.34.1")
3a08a411
AE
96 (source (origin
97 (method url-fetch)
3b8e4347 98 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
99 (version-major+minor version) "/"
100 name "-" version ".tar.xz"))
3a08a411
AE
101 (sha256
102 (base32
336cf4e7 103 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
5f07df17 104 (build-system meson-build-system)
13a9e291 105 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
106 (native-inputs
107 `(("pkg-config" ,pkg-config)
5f07df17 108 ("gettext" ,gettext-minimal)
426adbe8 109 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 110 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 111 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
112 (description
113 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 114by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
115tools have full access to view and control running applications.")
116 (license license:lgpl2.0+)
117 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
118
119(define-public cairo
120 (package
121 (name "cairo")
d1ee69a9 122 (version "1.16.0")
6131c43d
AE
123 (source (origin
124 (method url-fetch)
b3822954 125 (uri (string-append "https://cairographics.org/releases/cairo-"
6131c43d
AE
126 version ".tar.xz"))
127 (sha256
128 (base32
d1ee69a9 129 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
6131c43d
AE
130 (build-system gnu-build-system)
131 (propagated-inputs
132 `(("fontconfig" ,fontconfig)
133 ("freetype" ,freetype)
134 ("glib" ,glib)
135 ("libpng" ,libpng)
136 ("libx11" ,libx11)
137 ("libxext" ,libxext)
138 ("libxrender" ,libxrender)
139 ("pixman" ,pixman)))
140 (inputs
141 `(("ghostscript" ,ghostscript)
142 ("libspectre" ,libspectre)
6131c43d 143 ("poppler" ,poppler)
caf90259 144 ("xorgproto" ,xorgproto)
6131c43d 145 ("zlib" ,zlib)))
c4c4cc05
JD
146 (native-inputs
147 `(("pkg-config" ,pkg-config)
148 ("python" ,python-wrapper)))
6131c43d 149 (arguments
77888fae 150 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
a114b262 151 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
bbd1e4e7 152 "--enable-xml" ;for cairo-xml support
a114b262 153 "--disable-static")))
6131c43d
AE
154 (synopsis "2D graphics library")
155 (description
156 "Cairo is a 2D graphics library with support for multiple output devices.
157Currently supported output targets include the X Window System (via both
158Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 159output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
160
161Cairo is designed to produce consistent output on all output media while
162taking advantage of display hardware acceleration when available
163eg. through the X Render Extension).
164
165The cairo API provides operations similar to the drawing operators of
35b9e423 166PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 167Bézier splines, transforming and compositing translucent images, and
35b9e423 168antialiased text rendering. All drawing operations can be transformed by any
e881752c 169affine transformation (scale, rotation, shear, etc.).")
6131c43d 170 (license license:lgpl2.1) ; or Mozilla Public License 1.1
b3822954 171 (home-page "https://cairographics.org/")))
a2609b41 172
40b3f523
DC
173(define-public cairo-xcb
174 (package
175 (inherit cairo)
176 (name "cairo-xcb")
177 (inputs
178 `(("mesa" ,mesa)
179 ,@(package-inputs cairo)))
180 (arguments
181 `(#:tests? #f
182 #:configure-flags
183 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
184 (synopsis "2D graphics library (with X11 support)")))
185
a2609b41
AE
186(define-public harfbuzz
187 (package
188 (name "harfbuzz")
c1024750 189 (version "2.6.4")
a2609b41 190 (source (origin
fd9b3b43 191 (method url-fetch)
5cc3096c 192 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43 193 "harfbuzz/release/harfbuzz-"
731d471a 194 version ".tar.xz"))
fd9b3b43
SB
195 (sha256
196 (base32
c1024750 197 "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
a2609b41 198 (build-system gnu-build-system)
0a129f39
SB
199 (outputs '("out"
200 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 201 (inputs
fd9b3b43
SB
202 `(("cairo" ,cairo)))
203 (propagated-inputs
204 ;; There are all in the Requires or Requires.private field of '.pc'.
205 `(("glib" ,glib)
27383915 206 ("graphite2" ,graphite2)
c4c4cc05
JD
207 ("icu4c" ,icu4c)))
208 (native-inputs
1c4b72cb
MB
209 `(("glib:bin" ,glib "bin") ;for glib-mkenums
210 ("gobject-introspection" ,gobject-introspection)
a30a0455 211 ("pkg-config" ,pkg-config)
7005f8cb
MB
212 ("python" ,python-wrapper)
213 ("which" ,which)))
27383915 214 (arguments
a30a0455 215 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
216 "--with-gobject"
217 ,(string-append
218 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 219 (synopsis "OpenType text shaping engine")
a2609b41
AE
220 (description
221 "HarfBuzz is an OpenType text shaping engine.")
222 (license (license:x11-style "file://COPYING"
223 "See 'COPYING' in the distribution."))
61320932 224 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
225
226(define-public pango
227 (package
228 (name "pango")
869b63cb 229 (version "1.44.7")
4b9adff9
AE
230 (source (origin
231 (method url-fetch)
dca1b58d
FB
232 (uri (string-append "mirror://gnome/sources/pango/"
233 (version-major+minor version) "/"
234 name "-" version ".tar.xz"))
869b63cb 235 (patches (search-patches "pango-skip-libthai-test.patch"))
4b9adff9
AE
236 (sha256
237 (base32
869b63cb
MB
238 "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
239 (build-system meson-build-system)
240 (arguments
241 '(#:phases (modify-phases %standard-phases
242 (add-after 'unpack 'disable-cantarell-tests
243 (lambda _
244 (substitute* "tests/meson.build"
245 ;; XXX FIXME: These tests require "font-cantarell", but
246 ;; adding it here would introduce a circular dependency.
247 (("\\[ 'test-harfbuzz'.*") "")
248 (("\\[ 'test-itemize'.*") "")
249 (("\\[ 'test-layout'.*") ""))
250 #t)))))
cf2135ff 251 (propagated-inputs
60a32a2d 252 ;; These are all in Requires or Requires.private of the '.pc' files.
4b9adff9 253 `(("cairo" ,cairo)
698ec949 254 ("fribidi" ,fribidi)
60a32a2d
MB
255 ("fontconfig" ,fontconfig)
256 ("freetype" ,freetype)
257 ("glib" ,glib)
869b63cb 258 ("harfbuzz" ,harfbuzz)
9a5acb54
JL
259
260 ;; Some packages, such as Openbox, expect Pango to be built with the
261 ;; optional libxft support.
262 ("libxft" ,libxft)))
869b63cb
MB
263 (inputs
264 `(("zlib" ,zlib)))
c4c4cc05 265 (native-inputs
141aed80 266 `(("pkg-config" ,pkg-config)
426adbe8 267 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 268 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
269 (synopsis "GNOME text and font handling library")
270 (description
271 "Pango is the core text and font handling library used in GNOME
35b9e423 272applications. It has extensive support for the different writing systems
4b9adff9
AE
273used throughout the world.")
274 (license license:lgpl2.0+)
275 (home-page "https://developer.gnome.org/pango/")))
527e7961 276
869b63cb 277(define-public pango-1.42
b8e08aa2
MB
278 (package
279 (inherit pango)
869b63cb
MB
280 (version "1.42.4")
281 (source (origin
282 (method url-fetch)
283 (uri (string-append "mirror://gnome/sources/pango/"
284 (version-major+minor version) "/"
285 "pango-" version ".tar.xz"))
286 (sha256
287 (base32
288 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
289 (build-system gnu-build-system)
290 (arguments '())))
291
5698b8b8
JD
292(define-public pangox-compat
293 (package
294 (name "pangox-compat")
295 (version "0.0.2")
296 (source (origin
297 (method url-fetch)
b38e45d8
EB
298 (uri (string-append "mirror://gnome/sources/" name "/"
299 (version-major+minor version) "/"
300 name "-" version ".tar.xz"))
5698b8b8
JD
301 (sha256
302 (base32
303 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
304 (build-system gnu-build-system)
305 (inputs
306 `(("glib" ,glib)
c67ee58c 307 ("pango" ,pango-1.42)))
5698b8b8
JD
308 (native-inputs
309 `(("intltool" ,intltool)
310 ("pkg-config" ,pkg-config)))
311 (home-page "https://developer.gnome.org/pango")
35b9e423 312 (synopsis "Obsolete pango functions")
5698b8b8
JD
313 (description "Pangox was a X backend to pango. It is now obsolete and no
314longer provided by recent pango releases. pangox-compat provides the
315functions which were removed.")
316 (license license:lgpl2.0+)))
317
e926ba71
RW
318(define-public ganv
319 (package
320 (name "ganv")
32cde877 321 (version "1.6.0")
e926ba71
RW
322 (source (origin
323 (method url-fetch)
0d0252e4 324 (uri (string-append "https://download.drobilla.net/ganv-"
ea7f3349 325 version ".tar.bz2"))
e926ba71
RW
326 (sha256
327 (base32
32cde877 328 "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
e926ba71 329 (build-system waf-build-system)
ea7f3349 330 (arguments
dc1d3cde
KK
331 `(#:phases
332 (modify-phases %standard-phases
333 (add-before 'configure 'set-flags
334 (lambda* (#:key outputs #:allow-other-keys)
dc1d3cde
KK
335 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
336 (setenv "LDFLAGS"
337 (string-append "-Wl,-rpath="
338 (assoc-ref outputs "out") "/lib"))
339 #t)))
ea7f3349 340 #:tests? #f)) ; no check target
e926ba71
RW
341 (inputs
342 `(("gtk" ,gtk+-2)
343 ("gtkmm" ,gtkmm-2)))
344 (native-inputs
345 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
346 ("pkg-config" ,pkg-config)))
0d0252e4 347 (home-page "https://drobilla.net/software/ganv/")
e926ba71
RW
348 (synopsis "GTK+ widget for interactive graph-like environments")
349 (description
350 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
351graph-like environments, e.g. modular synths or finite state machine
352diagrams.")
353 (license license:gpl3+)))
95d439b2 354
a9276c12 355(define-public ganv-devel
ab8f4a70 356 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
a9276c12
RW
357 (revision "1"))
358 (package
359 (inherit ganv)
360 (name "ganv")
ab8f4a70 361 (version (string-append "1.5.4-" revision "."
a9276c12
RW
362 (string-take commit 9)))
363 (source (origin
364 (method git-fetch)
365 (uri (git-reference
0d0252e4 366 (url "https://git.drobilla.net/ganv.git")
a9276c12 367 (commit commit)))
4a885c65 368 (file-name (git-file-name name version))
a9276c12
RW
369 (sha256
370 (base32
ab8f4a70 371 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
a9276c12 372
c900f843 373(define-public gtksourceview-2
95d439b2
JD
374 (package
375 (name "gtksourceview")
376 (version "2.10.5") ; This is the last version which builds against gtk+2
377 (source (origin
378 (method url-fetch)
b38e45d8
EB
379 (uri (string-append "mirror://gnome/sources/" name "/"
380 (version-major+minor version) "/"
381 name "-" version ".tar.bz2"))
95d439b2
JD
382 (sha256
383 (base32
db6dd04c
JL
384 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
385 (patches
386 (search-patches
387 "gtksourceview-2-add-default-directory.patch"))))
95d439b2 388 (build-system gnu-build-system)
c4c4cc05 389 (native-inputs
44add1ce 390 `(("intltool" ,intltool)
221ed17a 391 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
bd05ea41
SB
392 ("pkg-config" ,pkg-config)
393 ;; For testing.
ff337525 394 ("xorg-server" ,xorg-server-for-tests)
bd05ea41 395 ("shared-mime-info" ,shared-mime-info)))
68d85de1
TUBK
396 (propagated-inputs
397 ;; As per the pkg-config file.
bd05ea41
SB
398 `(("gtk" ,gtk+-2)
399 ("libxml2" ,libxml2)))
95d439b2
JD
400 (arguments
401 `(#:phases
402 ;; Unfortunately, some of the tests in "make check" are highly dependent
403 ;; on the environment therefore, some black magic is required.
dc1d3cde
KK
404 (modify-phases %standard-phases
405 (add-before 'check 'start-xserver
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((xorg-server (assoc-ref inputs "xorg-server"))
408 (mime (assoc-ref inputs "shared-mime-info")))
95d439b2 409
dc1d3cde
KK
410 ;; There must be a running X server and make check doesn't start one.
411 ;; Therefore we must do it.
412 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
413 (setenv "DISPLAY" ":1")
95d439b2 414
dc1d3cde
KK
415 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
416 (system "ln -s gtksourceview gtksourceview-2.0")
417 (setenv "XDG_DATA_HOME" (getcwd))
95d439b2 418
dc1d3cde
KK
419 ;; Finally, the mimetypes must be available.
420 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
421 #t)))))
95d439b2
JD
422 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
423 (description
424 "GtkSourceView is a portable C library that extends the standard GTK+
425framework for multiline text editing with support for configurable syntax
426highlighting, unlimited undo/redo, search and replace, a completion framework,
427printing and other features typical of a source code editor.")
428 (license license:lgpl2.0+)
429 (home-page "https://developer.gnome.org/gtksourceview/")))
430
c900f843
DH
431(define-public gtksourceview
432 (package
433 (name "gtksourceview")
44d9e575 434 (version "4.2.0")
c900f843
DH
435 (source (origin
436 (method url-fetch)
f7e4dd5d 437 (uri (string-append "mirror://gnome/sources/gtksourceview/"
c900f843 438 (version-major+minor version) "/"
f7e4dd5d 439 "gtksourceview-" version ".tar.xz"))
c900f843
DH
440 (sha256
441 (base32
44d9e575 442 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
c900f843
DH
443 (build-system gnu-build-system)
444 (arguments
445 '(#:phases
446 (modify-phases %standard-phases
447 (add-before
448 'check 'pre-check
449 (lambda* (#:key inputs #:allow-other-keys)
450 (let ((xorg-server (assoc-ref inputs "xorg-server")))
451 ;; Tests require a running X server.
452 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
453 (setenv "DISPLAY" ":1")
454 ;; For the missing /etc/machine-id.
455 (setenv "DBUS_FATAL_WARNINGS" "0")
456 #t))))))
457 (native-inputs
458 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
459 ("intltool" ,intltool)
b3546174 460 ("itstool" ,itstool)
c900f843
DH
461 ("gobject-introspection" ,gobject-introspection)
462 ("pkg-config" ,pkg-config)
463 ("vala" ,vala)
464 ;; For testing.
ff337525 465 ("xorg-server" ,xorg-server-for-tests)
c900f843
DH
466 ("shared-mime-info" ,shared-mime-info)))
467 (propagated-inputs
468 ;; gtksourceview-3.0.pc refers to all these.
469 `(("glib" ,glib)
470 ("gtk+" ,gtk+)
471 ("libxml2" ,libxml2)))
472 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
473 (synopsis "GNOME source code widget")
474 (description "GtkSourceView is a text widget that extends the standard
475GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
476highlighting and other features typical of a source code editor.")
477 (license license:lgpl2.1+)))
478
c5989b03
RW
479(define-public gtksourceview-3
480 (package (inherit gtksourceview)
481 (name "gtksourceview")
08185081 482 (version "3.24.10")
c5989b03
RW
483 (source (origin
484 (method url-fetch)
485 (uri (string-append "mirror://gnome/sources/" name "/"
486 (version-major+minor version) "/"
487 name "-" version ".tar.xz"))
488 (sha256
489 (base32
08185081 490 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
c5989b03 491
527e7961
AE
492(define-public gdk-pixbuf
493 (package
494 (name "gdk-pixbuf")
080edbe9 495 (version "2.40.0")
527e7961
AE
496 (source (origin
497 (method url-fetch)
b38e45d8
EB
498 (uri (string-append "mirror://gnome/sources/" name "/"
499 (version-major+minor version) "/"
500 name "-" version ".tar.xz"))
527e7961
AE
501 (sha256
502 (base32
080edbe9 503 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
a34ce330 504 (build-system meson-build-system)
48f46dc3 505 (arguments
83a40cbf 506 `(#:configure-flags '("-Dinstalled_tests=false")
a63a73dc
SB
507 #:phases
508 (modify-phases %standard-phases
509 (add-after
510 'unpack 'disable-failing-tests
511 (lambda _
a34ce330 512 (substitute* "tests/meson.build"
fe08b6e1
EF
513 ;; XXX FIXME: This test fails on armhf machines with:
514 ;; SKIP Not enough memory to load bitmap image
515 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a34ce330 516 ((".*'cve-2015-4491'.*") "")
a63a73dc
SB
517 ;; XXX FIXME: This test fails with:
518 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
519 ;; assertion failed (error == NULL): Data differ
520 ;; (gdk-pixbuf-error-quark, 0)
56a88478 521 ((".*'pixbuf-jpeg'.*") ""))
a34ce330 522 #t))
56a88478
EF
523 ;; The slow tests take longer than the specified timeout.
524 ,@(if (any (cute string=? <> (%current-system))
525 '("armhf-linux" "aarch64-linux"))
526 '((replace 'check
527 (lambda _
528 (invoke "meson" "test" "--timeout-multiplier" "5"))))
080edbe9 529 '()))))
6983ba56
SB
530 (propagated-inputs
531 `(;; Required by gdk-pixbuf-2.0.pc
532 ("glib" ,glib)
533 ("libpng" ,libpng)
534 ;; Used for testing and required at runtime.
535 ("shared-mime-info" ,shared-mime-info)))
1b5758a6 536 (inputs
4bd428a7 537 `(("libjpeg" ,libjpeg-turbo)
48f46dc3 538 ("libtiff" ,libtiff)
224276ab 539 ("libx11" ,libx11)))
c4c4cc05 540 (native-inputs
141aed80 541 `(("pkg-config" ,pkg-config)
a34ce330 542 ("gettext" ,gettext-minimal)
426adbe8 543 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 544 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
545 (synopsis "GNOME image loading and manipulation library")
546 (description
547 "GdkPixbuf is a library for image loading and manipulation developed
548in the GNOME project.")
549 (license license:lgpl2.0+)
550 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 551
34dc3907
SB
552;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
553;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
554;; closure size.
555(define-public gdk-pixbuf+svg
e60d3a55 556 (package (inherit gdk-pixbuf)
34dc3907
SB
557 (name "gdk-pixbuf+svg")
558 (inputs
559 `(("librsvg" ,librsvg)
560 ,@(package-inputs gdk-pixbuf)))
561 (arguments
a34ce330 562 '(#:configure-flags '("-Dinstalled-tests=false")
34dc3907
SB
563 #:tests? #f ; tested by the gdk-pixbuf package already
564 #:phases
565 (modify-phases %standard-phases
566 (add-after 'install 'register-svg-loader
567 (lambda* (#:key inputs outputs #:allow-other-keys)
568 (let* ((out (assoc-ref outputs "out"))
569 (librsvg (assoc-ref inputs "librsvg"))
570 (loaders
571 (append
572 (find-files out "^libpixbufloader-.*\\.so$")
573 (find-files librsvg "^libpixbufloader-.*\\.so$")))
574 (gdk-pixbuf-query-loaders
575 (string-append out "/bin/gdk-pixbuf-query-loaders")))
0c5c788f
MW
576 (apply invoke
577 gdk-pixbuf-query-loaders
578 "--update-cache"
579 loaders)))))))
34dc3907
SB
580 (synopsis
581 "GNOME image loading and manipulation library, with SVG support")))
582
f3fb92e5
AE
583(define-public at-spi2-core
584 (package
585 (name "at-spi2-core")
4ebc3339 586 (version "2.34.0")
f3fb92e5
AE
587 (source (origin
588 (method url-fetch)
589 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
590 (version-major+minor version) "/"
591 name "-" version ".tar.xz"))
f3fb92e5
AE
592 (sha256
593 (base32
4ebc3339 594 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
8c5b884c 595 (build-system meson-build-system)
068a53c3 596 (outputs '("out" "doc"))
f3fb92e5 597 (arguments
b19d6805 598 '(#:configure-flags
5254f17e 599 (list "-Ddocs=true")
50cc7f41 600 #:phases
af108677 601 (modify-phases %standard-phases
8c5b884c
RW
602 (add-after 'unpack 'set-documentation-path
603 (lambda* (#:key outputs #:allow-other-keys)
604 ;; Ensure that the cross-references point to the "doc" output.
605 (substitute* "doc/libatspi/meson.build"
606 (("docpath =.*")
607 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
608 #t))
609 (add-before 'install 'prepare-doc-directory
610 (lambda* (#:key outputs #:allow-other-keys)
611 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
612 #t))
613 (add-after 'install 'move-documentation
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (doc (assoc-ref outputs "doc")))
617 (copy-recursively
618 (string-append out "/share/gtk-doc")
619 (string-append doc "/share/gtk-doc"))
620 (delete-file-recursively
621 (string-append out "/share/gtk-doc")))
622 #t))
623 (add-after 'install 'check
624 (lambda _
625 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
626 ;; Run test-suite under a dbus session.
627 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
628 (string-append %output "/share"))
629 ;; Don't fail on missing '/etc/machine-id'.
630 (setenv "DBUS_FATAL_WARNINGS" "0") ;
631 (invoke "dbus-launch" "ninja" "test")))
632 (delete 'check))))
c6a552da
SB
633 (propagated-inputs
634 ;; atspi-2.pc refers to all these.
635 `(("dbus" ,dbus)
5254f17e
MB
636 ("glib" ,glib)
637 ("libxi" ,libxi)
c6a552da 638 ("libxtst" ,libxtst)))
c4c4cc05 639 (native-inputs
96941537
MB
640 `(("gettext" ,gettext-minimal)
641 ("gobject-introspection" ,gobject-introspection)
8c5b884c
RW
642 ("gtk-doc" ,gtk-doc)
643 ("glib" ,glib "bin")
50cc7f41 644 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
645 (synopsis "Assistive Technology Service Provider Interface, core components")
646 (description
647 "The Assistive Technology Service Provider Interface, core components,
648is part of the GNOME accessibility project.")
649 (license license:lgpl2.0+)
650 (home-page "https://projects.gnome.org/accessibility/")))
651
5fda4784
AE
652(define-public at-spi2-atk
653 (package
654 (name "at-spi2-atk")
3d19c77d 655 (version "2.34.1")
5fda4784
AE
656 (source (origin
657 (method url-fetch)
658 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
659 (version-major+minor version) "/"
660 name "-" version ".tar.xz"))
5fda4784
AE
661 (sha256
662 (base32
3d19c77d 663 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
3ea5a8ee 664 (build-system meson-build-system)
5fda4784 665 (arguments
57fcd224
SB
666 '(#:phases
667 (modify-phases %standard-phases
3a4de6b2 668 (replace 'check
57fcd224
SB
669 ;; Run test-suite under a dbus session.
670 (lambda _
5fba12ec 671 (setenv "DBUS_FATAL_WARNINGS" "0")
3ea5a8ee 672 (invoke "dbus-launch" "meson" "test"))))))
6967cc3f
SB
673 (propagated-inputs
674 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
675 (inputs
676 `(("atk" ,atk)))
c4c4cc05 677 (native-inputs
3ea5a8ee
MB
678 `(("pkg-config" ,pkg-config)
679 ;; For tests.
680 ("dbus" ,dbus)
681 ("libxml2" ,libxml2)))
5fda4784
AE
682 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
683 (description
684 "The Assistive Technology Service Provider Interface
685is part of the GNOME accessibility project.")
686 (license license:lgpl2.0+)
687 (home-page "https://projects.gnome.org/accessibility/")))
688
8b79a547 689(define-public gtk+-2
cf2135ff
AE
690 (package
691 (name "gtk+")
f55ef78b 692 (version "2.24.32")
cf2135ff
AE
693 (source (origin
694 (method url-fetch)
1c8362a8 695 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
696 (version-major+minor version) "/"
697 name "-" version ".tar.xz"))
cf2135ff
AE
698 (sha256
699 (base32
f55ef78b 700 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
6983ba56 701 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
711670c0 702 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
f55ef78b 703 "gtk2-theme-paths.patch"))))
cf2135ff 704 (build-system gnu-build-system)
e8cbebb4 705 (outputs '("out" "bin" "doc"))
4169a4bc 706 (propagated-inputs
cf2135ff 707 `(("atk" ,atk)
6983ba56 708 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 709 ("pango" ,pango)))
dfbce50c
SB
710 (inputs
711 `(("cups" ,cups)
712 ("libxcomposite" ,libxcomposite)
713 ("libxcursor" ,libxcursor)
714 ("libxdamage" ,libxdamage)
715 ("libxi" ,libxi)
716 ("libxinerama" ,libxinerama)
717 ("libxrandr" ,libxrandr)))
c4c4cc05 718 (native-inputs
1c8362a8 719 `(("perl" ,perl)
b94a6ca0 720 ("gettext" ,gettext-minimal)
426adbe8 721 ("glib" ,glib "bin")
9d297fae 722 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
723 ("pkg-config" ,pkg-config)
724 ("python-wrapper" ,python-wrapper)))
cf2135ff 725 (arguments
b19d6805 726 `(#:configure-flags
6b1f2388
SB
727 (list "--with-xinput=yes"
728 (string-append "--with-html-dir="
729 (assoc-ref %outputs "doc")
730 "/share/gtk-doc/html"))
9d297fae 731 #:phases
e8cbebb4
JL
732 (modify-phases %standard-phases
733 (add-before 'configure 'disable-tests
734 (lambda _
735 ;; FIXME: re-enable tests requiring an X server
736 (substitute* "gtk/Makefile.in"
737 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
738 #t))
739 (add-after 'install 'remove-cache
740 (lambda* (#:key outputs #:allow-other-keys)
741 (for-each
742 delete-file
743 (find-files (assoc-ref outputs "out") "immodules.cache"))
744 #t)))))
2a6afac9
RW
745 (native-search-paths
746 (list (search-path-specification
747 (variable "GUIX_GTK2_PATH")
748 (files '("lib/gtk-2.0")))))
0327ced2 749 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
750 (description
751 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 752graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
753suitable for projects ranging from small one-off tools to complete
754application suites.")
755 (license license:lgpl2.0+)
24d6cc1d 756 (home-page "https://www.gtk.org/")))
8e70e6d2 757
8b79a547
AE
758(define-public gtk+
759 (package (inherit gtk+-2)
b38e45d8 760 (name "gtk+")
a947f71c 761 (version "3.24.20")
8b79a547
AE
762 (source (origin
763 (method url-fetch)
b38e45d8
EB
764 (uri (string-append "mirror://gnome/sources/" name "/"
765 (version-major+minor version) "/"
766 name "-" version ".tar.xz"))
8b79a547
AE
767 (sha256
768 (base32
a947f71c 769 "1wqxkd3xnqwihcawncp9mkf9bv5a5fg5i4ahm6klpl782vvnkb1d"))
234e7980 770 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
87d336e2 771 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
0e112540 772 (propagated-inputs
8b79a547 773 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 774 ("atk" ,atk)
6983ba56 775 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 776 ("libepoxy" ,libepoxy)
a572dca8 777 ("libxcursor" ,libxcursor)
8b79a547
AE
778 ("libxi" ,libxi)
779 ("libxinerama" ,libxinerama)
982b3574 780 ("libxkbcommon" ,libxkbcommon)
9e5c0927 781 ("libxdamage" ,libxdamage)
52b61e99 782 ("libxrandr" ,libxrandr)
982b3574
KK
783 ("mesa" ,mesa)
784 ("pango" ,pango)
785 ("wayland" ,wayland)
786 ("wayland-protocols" ,wayland-protocols)))
0e112540 787 (inputs
6983ba56 788 `(("libxml2" ,libxml2)
1cb16f1e
SB
789 ;; XXX: colord depends on mozjs (through polkit), which fails on
790 ;; on non-intel systems now.
791 ;;("colord" ,colord)
a572dca8 792 ("cups" ,cups) ;for printing support
a2651b54
SB
793 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
794 ;;("rest" ,rest)
a572dca8 795 ("json-glib" ,json-glib)))
c4c4cc05 796 (native-inputs
141aed80 797 `(("perl" ,perl)
426adbe8 798 ("glib" ,glib "bin")
b94a6ca0 799 ("gettext" ,gettext-minimal)
8b79a547 800 ("pkg-config" ,pkg-config)
141aed80 801 ("gobject-introspection" ,gobject-introspection)
8b79a547 802 ("python-wrapper" ,python-wrapper)
da79e82b
LF
803 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
804 ;; of updating xorg-server directly on the master branch.
60ecc10f 805 ("xorg-server" ,xorg-server-for-tests)))
8b79a547 806 (arguments
60ecc10f 807 `(#:disallowed-references (,xorg-server-for-tests)
da79e82b 808 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
260b07a7
LC
809 ;; to "doc".
810 #:configure-flags (list (string-append "--with-html-dir="
811 (assoc-ref %outputs "doc")
982b3574
KK
812 "/share/gtk-doc/html")
813 ;; The header file <gdk/gdkwayland.h> is required
814 ;; by gnome-control-center
815 "--enable-wayland-backend"
816 ;; This is necessary to build both backends.
150e2301
DM
817 "--enable-x11-backend"
818 ;; This enables the HTML5 websocket backend.
819 "--enable-broadway-backend")
e4360e16
JD
820 #:phases (modify-phases %standard-phases
821 (add-before 'configure 'pre-configure
822 (lambda _
823 ;; Disable most tests, failing in the chroot with the message:
824 ;; D-Bus library appears to be incorrectly set up; failed to read
825 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
826 ;; directory.
827 ;; See the manual page for dbus-uuidgen to correct this issue.
828 (substitute* "testsuite/Makefile.in"
829 (("SUBDIRS = gdk gtk a11y css reftests")
830 "SUBDIRS = gdk"))
4c8c2b0f
SB
831 #t))
832 (add-after 'install 'move-desktop-files
833 ;; Move desktop files into 'bin' to avoid cycle references.
834 (lambda* (#:key outputs #:allow-other-keys)
835 (let ((out (assoc-ref outputs "out"))
836 (bin (assoc-ref outputs "bin")))
837 (mkdir-p (string-append bin "/share"))
838 (rename-file (string-append out "/share/applications")
839 (string-append bin "/share/applications"))
840 #t))))))
4828ff91
RW
841 (native-search-paths
842 (list (search-path-specification
843 (variable "GUIX_GTK3_PATH")
844 (files '("lib/gtk-3.0")))))))
5fda4784 845
8e70e6d2
LC
846;;;
847;;; Guile bindings.
848;;;
849
850(define-public guile-cairo
851 (package
852 (name "guile-cairo")
2bc8b2af 853 (version "1.10.0")
8e70e6d2 854 (source (origin
b9743865 855 (method url-fetch)
2bc8b2af
LC
856 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
857 version ".tar.gz"))
b9743865
LC
858 (sha256
859 (base32
2bc8b2af
LC
860 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
861 (modules '((guix build utils)))
862 (snippet
863 (begin
864 '(begin
865 ;; Install Scheme files in …/guile/site/X.Y.
866 (substitute* (find-files "." "^Makefile\\.in$")
867 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
868 (string-append name "dir = " prefix
869 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
870 suffix)))
e4dbe0cd
LC
871
872 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
873 ;; other headers but this is no longer the case in 3.0.
874 (substitute* (find-files "." "\\.[ch]$")
875 (("^ *# *include.*libguile\\.h.*$")
876 "#include <libguile.h>\n#include <string.h>\n"))
2bc8b2af 877 #t)))))
8e70e6d2 878 (build-system gnu-build-system)
b6bee63b
LC
879 (arguments
880 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
881 ;; because of them.
882 '(#:configure-flags '("--disable-Werror")))
8e70e6d2 883 (inputs
5ace0919 884 `(("guile-lib" ,guile-lib)
8e70e6d2 885 ("expat" ,expat)
b6bee63b 886 ("guile" ,guile-3.0)))
49710cea
LC
887 (propagated-inputs
888 ;; The .pc file refers to 'cairo'.
889 `(("cairo" ,cairo)))
c4c4cc05 890 (native-inputs
b9743865 891 `(("pkg-config" ,pkg-config)))
340978d7 892 (home-page "https://www.nongnu.org/guile-cairo/")
8e70e6d2
LC
893 (synopsis "Cairo bindings for GNU Guile")
894 (description
895 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
896Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
897stable, providing a firm base on which to do graphics work. Finally, and
898importantly, it is pleasant to use. You get a powerful and well-maintained
899graphics library with all of the benefits of Scheme: memory management,
900exceptions, macros, and a dynamic programming environment.")
901 (license license:lgpl3+)))
66663503 902
b6bee63b 903(define-public guile2.2-cairo
e4dbe0cd
LC
904 (package
905 (inherit guile-cairo)
b6bee63b 906 (name "guile2.2-cairo")
e4dbe0cd 907 (inputs
b6bee63b
LC
908 `(("guile" ,guile-2.2)
909 ("guile-lib" ,guile2.2-lib)
e4dbe0cd
LC
910 ,@(fold alist-delete (package-inputs guile-cairo)
911 '("guile" "guile-lib"))))))
912
b6bee63b
LC
913(define-public guile3.0-cairo
914 (deprecated-package "guile3.0-cairo" guile-cairo))
915
1a51fe27 916(define-public guile-rsvg
1b0f266e
LC
917 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
918 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
919 (revision "0"))
920 (package
921 (name "guile-rsvg")
922 (version (string-append "2.18.1-" revision "."
923 (string-take commit 7)))
924 (source (origin
925 (method url-fetch)
926 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
927 "repository/archive.tar.gz?ref="
928 commit))
929 (sha256
930 (base32
931 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
932 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
933 (modules '((guix build utils)))
934 (snippet
6cbee49d
MW
935 '(begin
936 (substitute* (find-files "." "Makefile\\.am")
937 (("/share/guile/site")
938 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
939 #t))
1b0f266e
LC
940 (file-name (string-append name "-" version ".tar.gz"))))
941 (build-system gnu-build-system)
df17d508
MW
942 (arguments
943 `(#:phases (modify-phases %standard-phases
944 (replace 'bootstrap
945 (lambda _
946 (invoke "autoreconf" "-vfi"))))))
1b0f266e
LC
947 (native-inputs `(("pkg-config" ,pkg-config)
948 ("autoconf" ,autoconf)
949 ("automake" ,automake)
950 ("libtool" ,libtool)
951 ("texinfo" ,texinfo)))
b6bee63b 952 (inputs `(("guile" ,guile-3.0)
1b0f266e
LC
953 ("librsvg" ,librsvg)
954 ("guile-lib" ,guile-lib))) ;for (unit-test)
955 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
956 (synopsis "Render SVG images using Cairo from Guile")
957 (description
958 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 959images onto Cairo surfaces.")
69669b28 960 (home-page "https://wingolog.org/projects/guile-rsvg/")
1b0f266e 961 (license license:lgpl2.1+))))
7ca0dbc3 962
b6bee63b 963(define-public guile2.2-rsvg
46378df0
LC
964 (package
965 (inherit guile-rsvg)
b6bee63b 966 (name "guile2.2-rsvg")
46378df0 967 (inputs
b6bee63b
LC
968 `(("guile" ,guile-2.2)
969 ("guile-lib" ,guile2.2-lib)
46378df0
LC
970 ,@(fold alist-delete (package-inputs guile-rsvg)
971 '("guile" "guile-lib"))))
b6bee63b
LC
972 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
973
974(define-public guile3.0-rsvg
975 (deprecated-package "guile3.0-rsvg" guile-rsvg))
46378df0 976
cdd383e9
LC
977(define-public guile-present
978 (package
979 (name "guile-present")
980 (version "0.3.0")
981 (source (origin
982 (method url-fetch)
983 (uri (string-append "http://wingolog.org/pub/guile-present/"
984 "guile-present-" version ".tar.gz"))
985 (sha256
986 (base32
987 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
b93cde3d
LC
988 (patches (search-patches "guile-present-coding.patch"))
989 (modules '((guix build utils)))
990 (snippet
991 '(begin
2c9fd763
LC
992 ;; Allow builds with Guile 3.0.
993 (substitute* "configure"
994 (("2\\.2 2\\.0")
995 "3.0 2.2 2.0"))
996
b93cde3d
LC
997 ;; Install .go files in the right place.
998 (substitute* "Makefile.in"
999 (("/ccache") "/site-ccache"))
1000 #t))))
cdd383e9
LC
1001 (build-system gnu-build-system)
1002 (arguments
897186c1 1003 `(#:phases
dc1d3cde
KK
1004 (modify-phases %standard-phases
1005 (add-after 'install 'post-install
1006 (lambda* (#:key inputs outputs #:allow-other-keys)
1007 (let* ((out (assoc-ref outputs "out"))
1008 (bin (string-append out "/bin"))
897186c1
LC
1009 (guile (assoc-ref inputs "guile"))
1010 (version
1011 ,(match (assoc "guile" (package-inputs this-package))
1012 (("guile" guile)
1013 (version-major+minor (package-version guile))))))
dc1d3cde
KK
1014 (substitute* (find-files bin ".*")
1015 (("guile")
1016 (string-append guile "/bin/guile -L "
897186c1
LC
1017 out "/share/guile/site/" version " -C "
1018 out "/lib/guile/" version "/site-ccache "))))
dc1d3cde 1019 #t)))))
cdd383e9 1020 (native-inputs `(("pkg-config" ,pkg-config)))
b6bee63b 1021 (inputs `(("guile" ,guile-3.0)))
cdd383e9
LC
1022 (propagated-inputs
1023 ;; These are used by the (present …) modules.
5ace0919 1024 `(("guile-lib" ,guile-lib)
cdd383e9
LC
1025 ("guile-cairo" ,guile-cairo)
1026 ("guile-rsvg" ,guile-rsvg)))
35f985cb 1027 (home-page "https://wingolog.org/software/guile-present/")
cdd383e9
LC
1028 (synopsis "Create SVG or PDF presentations in Guile")
1029 (description
1030 "Guile-Present defines a declarative vocabulary for presentations,
1031together with tools to render presentation documents as SVG or PDF.
1032Guile-Present can be used to make presentations programmatically, but also
1033includes a tools to generate PDF presentations out of Org mode and Texinfo
1034documents.")
1035 (license license:lgpl3+)))
7ca0dbc3 1036
b6bee63b 1037(define-public guile2.2-present
2c9fd763
LC
1038 (package
1039 (inherit guile-present)
b6bee63b
LC
1040 (name "guile2.2-present")
1041 (inputs `(("guile" ,guile-2.2)))
2c9fd763 1042 (propagated-inputs
b6bee63b
LC
1043 `(("guile-lib" ,guile2.2-lib)
1044 ("guile-cairo" ,guile2.2-cairo)
1045 ("guile-rsvg" ,guile2.2-rsvg)))))
1046
1047(define-public guile3.0-present
1048 (deprecated-package "guile3.0-present" guile-present))
2c9fd763 1049
9b381643
PH
1050(define-public guile-gnome
1051 (package
1052 (name "guile-gnome")
1b0f266e 1053 (version "2.16.5")
9b381643
PH
1054 (source (origin
1055 (method url-fetch)
1056 (uri
1057 (string-append "mirror://gnu/" name
1058 "/guile-gnome-platform/guile-gnome-platform-"
1059 version ".tar.gz"))
1060 (sha256
1061 (base32
1b0f266e 1062 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
1063 (build-system gnu-build-system)
1064 (native-inputs
1065 `(("pkg-config" ,pkg-config)
1066 ("atk" ,atk)
1067 ;;("corba" ,corba) ; not packaged yet
1068 ("gconf" ,gconf)
1069 ("gobject-introspection" ,gobject-introspection)
1070 ;;("gthread" ,gthread) ; not packaged yet
1071 ("gnome-vfs" ,gnome-vfs)
1072 ("gdk-pixbuf" ,gdk-pixbuf)
1073 ("gtk+" ,gtk+-2)
1074 ("libglade" ,libglade)
1075 ("libgnome" ,libgnome)
1076 ("libgnomecanvas" ,libgnomecanvas)
1077 ("libgnomeui" ,libgnomeui)
1078 ("pango" ,pango)
1079 ("libffi" ,libffi)
1080 ("glib" ,glib)))
1b0f266e 1081 (inputs `(("guile" ,guile-2.2)))
9b381643 1082 (propagated-inputs
b6bee63b 1083 `(("guile-cairo" ,guile2.2-cairo)
9b381643 1084 ("g-wrap" ,g-wrap)
b6bee63b 1085 ("guile-lib" ,guile2.2-lib)))
9b381643
PH
1086 (arguments
1087 `(#:tests? #f ;FIXME
1088 #:phases (modify-phases %standard-phases
1089 (add-before 'configure 'pre-configure
1090 (lambda* (#:key outputs #:allow-other-keys)
1091 (let ((out (assoc-ref outputs "out")))
1092 (substitute* (find-files "." "^Makefile.in$")
1093 (("guilesite :=.*guile/site" all)
1b0f266e 1094 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
1095 #t))))))
1096 (outputs '("out" "debug"))
1097 (synopsis "Guile interface for GTK+ programming for GNOME")
1098 (description
1099 "Includes guile-clutter, guile-gnome-gstreamer,
1100guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 1101 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
1102 (license license:gpl2+)
1103 (properties '((upstream-name . "guile-gnome-platform")
1104 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 1105
66663503
LC
1106;;;
1107;;; C++ bindings.
1108;;;
1109
1110(define-public cairomm
1111 (package
1112 (name "cairomm")
5a52e86e 1113 (version "1.12.2")
66663503 1114 (source (origin
2079087c 1115 (method url-fetch)
5a52e86e
EF
1116 (uri (string-append "https://www.cairographics.org/releases/"
1117 name "-" version ".tar.gz"))
2079087c
SB
1118 (sha256
1119 (base32
5a52e86e 1120 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
1121 (build-system gnu-build-system)
1122 (arguments
1123 ;; The examples lack -lcairo.
1124 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 1125 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
1126 (propagated-inputs
1127 `(("libsigc++" ,libsigc++)
1128 ("freetype" ,freetype)
1129 ("fontconfig" ,fontconfig)
1130 ("cairo" ,cairo)))
5a52e86e 1131 (home-page "https://cairographics.org/")
66663503
LC
1132 (synopsis "C++ bindings to the Cairo 2D graphics library")
1133 (description
1134 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1135library.")
1136 (license license:lgpl2.0+)))
c5cc5006
LC
1137
1138(define-public pangomm
1139 (package
1140 (name "pangomm")
13b0a85d 1141 (version "2.42.0")
c5cc5006
LC
1142 (source (origin
1143 (method url-fetch)
b38e45d8
EB
1144 (uri (string-append "mirror://gnome/sources/" name "/"
1145 (version-major+minor version) "/"
1146 name "-" version ".tar.xz"))
c5cc5006
LC
1147 (sha256
1148 (base32
13b0a85d 1149 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
c5cc5006 1150 (build-system gnu-build-system)
c4c4cc05 1151 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1152 (propagated-inputs
1153 `(("cairo" ,cairo)
1154 ("cairomm" ,cairomm)
1155 ("glibmm" ,glibmm)
1156 ("pango" ,pango)))
5acaec82 1157 (home-page "https://pango.gnome.org//")
c5cc5006
LC
1158 (synopsis "C++ interface to the Pango text rendering library")
1159 (description
1160 "Pangomm provides a C++ programming interface to the Pango text rendering
1161library.")
1162 (license license:lgpl2.1+)))
1163
1164(define-public atkmm
1165 (package
1166 (name "atkmm")
3ec19e96 1167 (version "2.28.0")
c5cc5006
LC
1168 (source (origin
1169 (method url-fetch)
b38e45d8
EB
1170 (uri (string-append "mirror://gnome/sources/" name "/"
1171 (version-major+minor version) "/"
1172 name "-" version ".tar.xz"))
c5cc5006
LC
1173 (sha256
1174 (base32
3ec19e96 1175 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
c5cc5006 1176 (build-system gnu-build-system)
c4c4cc05 1177 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1178 (propagated-inputs
1179 `(("glibmm" ,glibmm) ("atk" ,atk)))
8e933cb3 1180 (home-page "https://www.gtkmm.org")
c5cc5006
LC
1181 (synopsis "C++ interface to the ATK accessibility library")
1182 (description
1183 "ATKmm provides a C++ programming interface to the ATK accessibility
1184toolkit.")
1185 (license license:lgpl2.1+)))
1186
1187(define-public gtkmm
1188 (package
1189 (name "gtkmm")
b3cbae38 1190 (version "3.24.2")
c5cc5006
LC
1191 (source (origin
1192 (method url-fetch)
b38e45d8
EB
1193 (uri (string-append "mirror://gnome/sources/" name "/"
1194 (version-major+minor version) "/"
1195 name "-" version ".tar.xz"))
c5cc5006
LC
1196 (sha256
1197 (base32
b3cbae38 1198 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
c5cc5006 1199 (build-system gnu-build-system)
ff5c33fe 1200 (native-inputs `(("pkg-config" ,pkg-config)
ba470833 1201 ("glib" ,glib "bin") ;for 'glib-compile-resources'
60ecc10f 1202 ("xorg-server" ,xorg-server-for-tests)))
c5cc5006
LC
1203 (propagated-inputs
1204 `(("pangomm" ,pangomm)
1205 ("cairomm" ,cairomm)
1206 ("atkmm" ,atkmm)
1207 ("gtk+" ,gtk+)
1208 ("glibmm" ,glibmm)))
ba470833 1209 (arguments
c8f2050a 1210 `(#:disallowed-references (,xorg-server-for-tests)
29c7b4d6 1211 #:phases (modify-phases %standard-phases
ba470833
LC
1212 (add-before 'check 'run-xvfb
1213 (lambda* (#:key inputs #:allow-other-keys)
1214 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1215 ;; Tests such as 'object_move/test' require a running
1216 ;; X server.
1217 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1218 (setenv "DISPLAY" ":1")
1219 ;; Don't fail because of the missing /etc/machine-id.
1220 (setenv "DBUS_FATAL_WARNINGS" "0")
1221 #t))))))
8e933cb3 1222 (home-page "https://gtkmm.org/")
c5cc5006
LC
1223 (synopsis
1224 "C++ interface to the GTK+ graphical user interface library")
1225 (description
1226 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1227Highlights include typesafe callbacks, and a comprehensive set of widgets that
1228are easily extensible via inheritance. You can create user interfaces either
1229in code or with the Glade User Interface designer, using libglademm. There's
1230extensive documentation, including API reference and a tutorial.")
1231 (license license:lgpl2.1+)))
9c086443
JD
1232
1233
1234(define-public gtkmm-2
1235 (package (inherit gtkmm)
b38e45d8 1236 (name "gtkmm")
124596f2 1237 (version "2.24.5")
9c086443
JD
1238 (source (origin
1239 (method url-fetch)
b38e45d8
EB
1240 (uri (string-append "mirror://gnome/sources/" name "/"
1241 (version-major+minor version) "/"
1242 name "-" version ".tar.xz"))
9c086443
JD
1243 (sha256
1244 (base32
124596f2 1245 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
c8f2050a 1246 (arguments '())
ff5c33fe 1247 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1248 (propagated-inputs
1249 `(("pangomm" ,pangomm)
1250 ("cairomm" ,cairomm)
1251 ("atkmm" ,atkmm)
1252 ("gtk+" ,gtk+-2)
1253 ("glibmm" ,glibmm)))))
fbcfa730 1254
e07a4489
MB
1255(define-public gtksourceviewmm
1256 (package
1257 (name "gtksourceviewmm")
1258 (version "3.18.0")
1259 (source (origin
1260 (method url-fetch)
1261 (uri (string-append "mirror://gnome/sources/" name "/"
1262 (version-major+minor version) "/"
1263 name "-" version ".tar.xz"))
1264 (sha256
1265 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1266 (build-system gnu-build-system)
1267 (native-inputs
1268 `(("pkg-config" ,pkg-config)))
1269 (propagated-inputs
1270 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1271 `(("glibmm" ,glibmm)
1272 ("gtkmm" ,gtkmm)
a3d1a348 1273 ("gtksourceview" ,gtksourceview-3)))
e07a4489
MB
1274 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1275 (description
1276 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1277framework for multiline text editing with support for configurable syntax
1278highlighting, unlimited undo/redo, search and replace, a completion framework,
1279printing and other features typical of a source code editor.")
1280 (license license:lgpl2.1+)
1281 (home-page "https://developer.gnome.org/gtksourceview/")))
1282
1283;;;
1284;;; Python bindings.
1285;;;
1286
fbcfa730
EB
1287(define-public python-pycairo
1288 (package
1289 (name "python-pycairo")
1e03f8f4 1290 (version "1.19.1")
fbcfa730
EB
1291 (source
1292 (origin
1293 (method url-fetch)
6009cdb4
AI
1294 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1295 version "/pycairo-" version ".tar.gz"))
fbcfa730
EB
1296 (sha256
1297 (base32
1e03f8f4 1298 "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
6009cdb4 1299 (build-system python-build-system)
fbcfa730 1300 (native-inputs
b837e658 1301 `(("pkg-config" ,pkg-config)
6009cdb4 1302 ("python-pytest" ,python-pytest)))
fbcfa730
EB
1303 (propagated-inputs ;pycairo.pc references cairo
1304 `(("cairo" ,cairo)))
6009cdb4 1305 (home-page "https://cairographics.org/pycairo/")
fbcfa730
EB
1306 (synopsis "Python bindings for cairo")
1307 (description
1308 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1309 (license license:lgpl3+)
1310 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1311
a5670bd4
MB
1312;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1313;; with this older version here.
7ca0dbc3 1314(define-public python2-pycairo
6009cdb4
AI
1315 (let ((pycairo (package-with-python2
1316 (strip-python2-variant python-pycairo))))
1317 (package
1318 (inherit pycairo)
a5670bd4
MB
1319 (version "1.18.2")
1320 (source (origin
1321 (method url-fetch)
1322 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1323 "/download/v" version "/pycairo-" version ".tar.gz"))
1324 (sha256
1325 (base32
1326 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
6009cdb4
AI
1327 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1328 (license (list license:lgpl2.1 license:mpl1.1)))))
fbcfa730
EB
1329
1330(define-public python2-pygtk
1331 (package
1332 (name "python2-pygtk")
1333 (version "2.24.0")
1334 (source
1335 (origin
1336 (method url-fetch)
966a543b 1337 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1338 "/pygtk/" (version-major+minor version)
1339 "/pygtk-" version ".tar.bz2"))
1340 (sha256
1341 (base32
1342 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1343 (build-system gnu-build-system)
594e7b47
LC
1344 (outputs '("out"
1345 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1346 (native-inputs
1347 `(("pkg-config" ,pkg-config)))
1348 (inputs
1349 `(("python" ,python-2)
8c81210e
MB
1350
1351 ;; XXX: The package fails to build with the latest Pango (propagated
1352 ;; from GTK+2), so we provide it with this older version.
1353 ("pango" ,pango-1.42)
1354
6ab4712d 1355 ("libglade" ,libglade)
fbcfa730
EB
1356 ("glib" ,glib)))
1357 (propagated-inputs
7ca0dbc3 1358 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1359 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1360 ("gtk+" ,gtk+-2)))
1361 (arguments
1362 `(#:tests? #f
ae115bc7 1363 #:phases (modify-phases %standard-phases
594e7b47
LC
1364 (add-before 'configure 'set-gtk-doc-directory
1365 (lambda* (#:key outputs #:allow-other-keys)
1366 ;; Install documentation to "doc".
1367 (let ((doc (assoc-ref outputs "doc")))
1368 (substitute* "docs/Makefile.in"
1369 (("TARGET_DIR = \\$\\(datadir\\)")
1370 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1371 (add-after 'configure 'fix-codegen
1372 (lambda* (#:key inputs #:allow-other-keys)
1373 (substitute* "pygtk-codegen-2.0"
1374 (("^prefix=.*$")
1375 (string-append
1376 "prefix="
1377 (assoc-ref inputs "python-pygobject") "\n")))))
1378 (add-after 'install 'install-pth
1379 (lambda* (#:key inputs outputs #:allow-other-keys)
1380 ;; pygtk's modules are stored in a subdirectory of
1381 ;; python's site-packages directory. Add a .pth file so
1382 ;; that python will add that subdirectory to its module
1383 ;; search path.
1384 (let* ((out (assoc-ref outputs "out"))
1385 (site (string-append out "/lib/python"
1386 ,(version-major+minor
1387 (package-version python-2))
1388 "/site-packages")))
1389 (call-with-output-file (string-append site "/pygtk.pth")
1390 (lambda (port)
1391 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1392 (home-page "http://www.pygtk.org/")
1393 (synopsis "Python bindings for GTK+")
1394 (description
1395 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1396targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1397write GNOME applications.")
1398 (license license:lgpl2.1+)))
136770c9 1399
4e028d7a
AV
1400(define-public perl-cairo
1401 (package
1402 (name "perl-cairo")
2767beb3 1403 (version "1.107")
4e028d7a
AV
1404 (source (origin
1405 (method url-fetch)
1406 (uri (string-append
1407 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1408 version ".tar.gz"))
1409 (sha256
1410 (base32
2767beb3 1411 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
4e028d7a
AV
1412 (build-system perl-build-system)
1413 (native-inputs
1414 `(("perl-extutils-depends" ,perl-extutils-depends)
1415 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1416 (inputs
1417 `(("cairo" ,cairo)))
9aba9b12 1418 (home-page "https://metacpan.org/release/Cairo")
4e028d7a
AV
1419 (synopsis "Perl interface to the cairo 2d vector graphics library")
1420 (description "Cairo provides Perl bindings for the vector graphics library
1421cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1422produces identical output on all those targets.")
1423 (license license:lgpl2.1+)))
1424
b5bbcda3
AV
1425(define-public perl-gtk2
1426 (package
1427 (name "perl-gtk2")
8524b1b8 1428 (version "1.24993")
b5bbcda3
AV
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1432 version ".tar.gz"))
1433 (sha256
1434 (base32
8524b1b8 1435 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
b5bbcda3
AV
1436 (build-system perl-build-system)
1437 (native-inputs
1438 `(("perl-extutils-depends" ,perl-extutils-depends)
1439 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1440 (inputs
1441 `(("gtk+" ,gtk+-2)))
1442 (propagated-inputs
1443 `(("perl-pango" ,perl-pango)))
8fcb6077
PN
1444 (arguments
1445 `(#:phases
1446 (modify-phases %standard-phases
1447 (add-before 'build 'remove-broken-test
1448 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1449 (lambda _
1450 (substitute* "t/GdkPixbuf.t"
1451 (("tests => 112") "tests => 111")
1452 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1453 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
9aba9b12 1454 (home-page "https://metacpan.org/release/Gtk2")
b5bbcda3
AV
1455 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1456 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1457This module allows you to write graphical user interfaces in a Perlish and
1458object-oriented way, freeing you from the casting and memory management in C,
1459yet remaining very close in spirit to original API.")
1460 (license license:lgpl2.1+)))
1461
ee6911c7
AV
1462(define-public perl-pango
1463 (package
1464 (name "perl-pango")
1465 (version "1.227")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1469 version ".tar.gz"))
1470 (sha256
1471 (base32
1472 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1473 (build-system perl-build-system)
1474 (native-inputs
1475 `(("perl-extutils-depends" ,perl-extutils-depends)
1476 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1477 (inputs
1478 `(("pango" ,pango)))
1479 (propagated-inputs
1480 `(("perl-cairo" ,perl-cairo)
1481 ("perl-glib" ,perl-glib)))
9aba9b12 1482 (home-page "https://metacpan.org/release/Pango")
ee6911c7
AV
1483 (synopsis "Layout and render international text")
1484 (description "Pango is a library for laying out and rendering text, with an
1485emphasis on internationalization. Pango can be used anywhere that text layout
1486is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1487complete solution with high quality text handling and graphics rendering.
1488
1489Dynamically loaded modules handle text layout for particular combinations of
1490script and font backend. Pango provides a wide selection of modules, including
1491modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1492Virtually all of the world's major scripts are supported.
1493
1494In addition to the low level layout rendering routines, Pango includes
1495@code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1496and routines to assist in editing internationalized text.")
1497 (license license:lgpl2.1+)))
1498
136770c9
PW
1499(define-public girara
1500 (package
1501 (name "girara")
88634772 1502 (version "0.3.4")
f3d40153
TGR
1503 (source
1504 (origin
1505 (method git-fetch)
1506 (uri (git-reference
1507 (url "https://git.pwmt.org/pwmt/girara")
1508 (commit version)))
1509 (file-name (git-file-name name version))
1510 (sha256
88634772 1511 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
136770c9 1512 (native-inputs `(("pkg-config" ,pkg-config)
b82d5b09 1513 ("check" ,check)
bf38d5be 1514 ("gettext" ,gettext-minimal)
7d24c26e 1515 ("glib:bin" ,glib "bin")
60ecc10f 1516 ("xorg-server" ,xorg-server-for-tests)))
b82d5b09
MB
1517 ;; Listed in 'Requires.private' of 'girara.pc'.
1518 (propagated-inputs `(("gtk+" ,gtk+)))
136770c9 1519 (arguments
bba29e10 1520 `(#:phases (modify-phases %standard-phases
7d24c26e
MB
1521 (add-before 'check 'start-xserver
1522 ;; Tests require a running X server.
1523 (lambda* (#:key inputs #:allow-other-keys)
1524 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1525 (display ":1"))
1526 (setenv "DISPLAY" display)
3e6b398a
MB
1527
1528 ;; On busy machines, tests may take longer than
1529 ;; the default of four seconds.
1530 (setenv "CK_DEFAULT_TIMEOUT" "20")
1531
7d24c26e
MB
1532 ;; Don't fail due to missing '/etc/machine-id'.
1533 (setenv "DBUS_FATAL_WARNINGS" "0")
1534 (zero? (system (string-append xorg-server "/bin/Xvfb "
1535 display " &")))))))))
bba29e10 1536 (build-system meson-build-system)
136770c9
PW
1537 (home-page "https://pwmt.org/projects/girara/")
1538 (synopsis "Library for minimalistic gtk+3 user interfaces")
1539 (description "Girara is a library that implements a user interface that
1540focuses on simplicity and minimalism. Currently based on GTK+, a
1541cross-platform widget toolkit, it provides an interface that focuses on three
1542main components: a so-called view widget that represents the actual
1543application, an input bar that is used to execute commands of the
1544application and the status bar which provides the user with current
1545information.")
1546 (license license:zlib)))
3bc45449
AW
1547
1548(define-public gtk-doc
1549 (package
1550 (name "gtk-doc")
7a1bb44a 1551 (version "1.28")
3bc45449
AW
1552 (source (origin
1553 (method url-fetch)
1554 (uri (string-append "mirror://gnome/sources/" name "/"
1555 (version-major+minor version) "/"
1556 name "-" version ".tar.xz"))
1557 (sha256
1558 (base32
7a1bb44a 1559 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
3bc45449
AW
1560 (build-system gnu-build-system)
1561 (arguments
6ad08117
AE
1562 `(#:parallel-tests? #f
1563 #:phases
b4787e71 1564 (modify-phases %standard-phases
36ba88da
DM
1565 (add-after 'unpack 'patch-gtk-doc-scan
1566 (lambda* (#:key inputs #:allow-other-keys)
1567 (substitute* "gtk-doc.xsl"
1568 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1569 (string-append (assoc-ref inputs "docbook-xsl")
1570 "/xml/xsl/docbook-xsl-"
1571 ,(package-version docbook-xsl)
50ee7e93
PN
1572 "/html/chunk.xsl"))
1573 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1574 (string-append (assoc-ref inputs "docbook-xsl")
1575 "/xml/xsl/docbook-xsl-"
1576 ,(package-version docbook-xsl)
1577 "/common/en.xml")))
36ba88da
DM
1578 #t))
1579 (add-after 'patch-gtk-doc-scan 'patch-test-out
1580 (lambda _
1581 ;; sanity.sh counts the number of status lines. Since our
1582 ;; texlive regenerates the fonts every time and the font
1583 ;; generator metafont outputs a lot of extra lines, this
1584 ;; test would always fail. Disable it for now.
1585 (substitute* "tests/Makefile.in"
1586 (("empty.sh sanity.sh") "empty.sh"))
1587 #t))
a20608a5
RW
1588 (add-before 'build 'set-HOME
1589 (lambda _
1590 ;; FIXME: dblatex with texlive-union does not find the built
1591 ;; metafonts, so it tries to generate them in HOME.
1592 (setenv "HOME" "/tmp")
1593 #t))
1594 (add-before 'configure 'fix-docbook
b4787e71
AW
1595 (lambda* (#:key inputs #:allow-other-keys)
1596 (substitute* "configure"
1597 ;; The configure check is overzealous about making sure that
1598 ;; things are in place -- it uses the xmlcatalog tool to make
1599 ;; sure that docbook-xsl is available, but this tool can only
1600 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1601 ;; variable that Guix defines. Fool the test by using the
1602 ;; docbook-xsl catalog explicitly and get on with life.
1603 (("\"\\$XML_CATALOG_FILE\" \
1604\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1605 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1606 "^catalog.xml$"))
1607 " \"http://docbook.sourceforge.net/release/xsl/")))
d86a7c64
RW
1608 #t))
1609 (add-after 'install 'wrap-executables
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 (let ((out (assoc-ref outputs "out")))
1612 (for-each (lambda (prog)
1613 (wrap-program prog
1614 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1615 (find-files (string-append out "/bin")))
1616 #t))))
b4787e71 1617 #:configure-flags
3bc45449
AW
1618 (list (string-append "--with-xml-catalog="
1619 (assoc-ref %build-inputs "docbook-xml")
1620 "/xml/dtd/docbook/catalog.xml"))))
1621 (native-inputs
1622 `(("pkg-config" ,pkg-config)
1623 ("itstool" ,itstool)
1624 ("libxml" ,libxml2)
b94a6ca0 1625 ("gettext" ,gettext-minimal)
3bc45449
AW
1626 ("bc" ,bc)))
1627 (inputs
1628 `(("perl" ,perl)
1629 ("python" ,python)
1630 ("xsltproc" ,libxslt)
1631 ("dblatex" ,dblatex)
1632 ("docbook-xml" ,docbook-xml-4.3)
1633 ("docbook-xsl" ,docbook-xsl)
1634 ("source-highlight" ,source-highlight)
9c708566
DM
1635 ("glib" ,glib)
1636 ("python-six" ,python-six)))
24d6cc1d 1637 (home-page "https://www.gtk.org/gtk-doc/")
3bc45449
AW
1638 (synopsis "Documentation generator from C source code")
1639 (description
a124bbd2 1640 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1641typically used to document the public API of GTK+ and GNOME libraries, but it
1642can also be used to document application code.")
1643 (license license:gpl2+)))
9ba5198c
FH
1644
1645(define-public gtk-engines
1646 (package
1647 (name "gtk-engines")
1648 (version "2.20.2")
1649 (source (origin
1650 (method url-fetch)
1651 (uri (string-append "mirror://gnome/sources/" name "/"
1652 (version-major+minor version) "/"
1653 name "-" version ".tar.bz2"))
1654 (sha256
1655 (base32
1656 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1657 (build-system gnu-build-system)
1658 (arguments
1659 `(#:configure-flags
1660 `("--enable-animation")))
1661 (native-inputs
1662 `(("pkg-config" ,pkg-config)
1663 ("intltool" ,intltool)))
9fff9e64
SB
1664 (inputs
1665 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1666 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1667 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1668 (synopsis "Theming engines for GTK+ 2.x")
1669 (description
1670 "This package contains the standard GTK+ 2.x theming engines including
1671Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1672Redmond95 and ThinIce.")
1673 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1674
1675(define-public murrine
1676 (package
1677 (name "murrine")
1678 (version "0.98.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (string-append "mirror://gnome/sources/" name "/"
1682 (version-major+minor version) "/"
1683 name "-" version ".tar.xz"))
1684 (sha256
1685 (base32
1686 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1687 (build-system gnu-build-system)
1688 (arguments
1689 `(#:configure-flags
1690 `("--enable-animation"
1691 "--enable-animationrtl")))
1692 (native-inputs
1693 `(("pkg-config" ,pkg-config)
1694 ("intltool" ,intltool)))
1695 (propagated-inputs
1696 `(("gtk+" ,gtk+-2)))
f032d0be 1697 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1698 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1699 (description
1700 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1701glass artworks done by Venicians glass blowers.")
1702 (license license:gpl2+)))
9c0c77f8
KY
1703
1704(define-public gtkspell3
1705 (package
1706 (name "gtkspell3")
3be65cde 1707 (version "3.0.9")
9c0c77f8
KY
1708 (source (origin
1709 (method url-fetch)
1710 (uri (string-append "mirror://sourceforge/gtkspell/"
3be65cde 1711 version "/" name "-" version ".tar.xz"))
9c0c77f8
KY
1712 (sha256
1713 (base32
3be65cde 1714 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
9c0c77f8
KY
1715 (build-system gnu-build-system)
1716 (native-inputs
1717 `(("intltool" ,intltool)
4ad7e7e6
GL
1718 ("pkg-config" ,pkg-config)
1719 ("vala" ,vala)))
9c0c77f8 1720 (inputs
c1d59b3c 1721 `(("gobject-introspection" ,gobject-introspection)
9c0c77f8
KY
1722 ("gtk+" ,gtk+)
1723 ("pango" ,pango)))
cd49e478 1724 (propagated-inputs
c1d59b3c 1725 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
9c0c77f8
KY
1726 (home-page "http://gtkspell.sourceforge.net")
1727 (synopsis "Spell-checking addon for GTK's TextView widget")
1728 (description
1729 "GtkSpell provides word-processor-style highlighting and replacement of
1730misspelled words in a GtkTextView widget.")
1731 (license license:gpl2+)))
37355498 1732
1733(define-public clipit
1734 (package
1735 (name "clipit")
85355683
TGR
1736 (version "1.4.4")
1737 (source
1738 (origin
1739 (method git-fetch)
1740 (uri (git-reference
1741 (url "https://github.com/CristianHenzel/ClipIt.git")
1742 (commit (string-append "v" version))))
1743 (file-name (git-file-name name version))
1744 (sha256
1745 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
37355498 1746 (build-system gnu-build-system)
1747 (native-inputs
85355683
TGR
1748 `(("autoconf" ,autoconf)
1749 ("automake" ,automake)
1750 ("intltool" ,intltool)
37355498 1751 ("pkg-config" ,pkg-config)))
1752 (inputs
1753 `(("gtk+" ,gtk+-2)))
1754 (home-page "https://github.com/CristianHenzel/ClipIt")
1755 (synopsis "Lightweight GTK+ clipboard manager")
1756 (description
1757 "ClipIt is a clipboard manager with features such as a history, search
1758thereof, global hotkeys and clipboard item actions. It was forked from
1759Parcellite and adds bugfixes and features.")
1760 (license license:gpl2+)))
61af2675
RJ
1761
1762(define-public graphene
1763 (package
1764 (name "graphene")
8c2a6183 1765 (version "1.10.0")
61af2675
RJ
1766 (source (origin
1767 (method url-fetch)
8c2a6183
EF
1768 (uri (string-append "https://github.com/ebassi/graphene/releases/"
1769 "download/" version
1770 "/graphene-" version ".tar.xz"))
61af2675 1771 (sha256
8c2a6183
EF
1772 (base32 "16b4hz73bnrgv5v8n96dczkd6xp9qc06lrl43zln3jnl3psrfva0"))))
1773 (build-system meson-build-system)
61af2675 1774 (arguments
8c2a6183 1775 `(#:configure-flags '("-Dinstalled_tests=false")))
61af2675 1776 (native-inputs
8c2a6183
EF
1777 `(("gobject-introspection" ,gobject-introspection)
1778 ("pkg-config" ,pkg-config)))
61af2675
RJ
1779 (inputs
1780 `(("python" ,python)
8c2a6183 1781 ("glib" ,glib)))
806b0c2c 1782 (home-page "https://ebassi.github.io/graphene/")
61af2675
RJ
1783 (synopsis "Thin layer of graphic data types")
1784 (description "This library provides graphic types and their relative API;
1785it does not deal with windowing system surfaces, drawing, scene graphs, or
1786input.")
1787 (license license:expat)))
57d70dba 1788
e2f36385
KK
1789(define-public spread-sheet-widget
1790 (package
1791 (name "spread-sheet-widget")
1792 (version "0.3")
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
22e68554 1797 "spread-sheet-widget-" version ".tar.gz"))
e2f36385
KK
1798 (sha256
1799 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1800 (build-system gnu-build-system)
1801 (native-inputs
22e68554 1802 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
e2f36385
KK
1803 ("pkg-config" ,pkg-config)))
1804 ;; In 'Requires' of spread-sheet-widget.pc.
1805 (propagated-inputs
1806 `(("glib" ,glib)
1807 ("gtk+" ,gtk+)))
1808 (home-page "https://www.gnu.org/software/ssw/")
1809 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1810 (description
1811 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1812viewing and manipulating 2 dimensional tabular data in a manner similar to many
1813popular spread sheet programs.")
1814 (license license:gpl3+)))
1815
2ea3bfe7
TGR
1816(define-public volumeicon
1817 (package
1818 (name "volumeicon")
1819 (version "0.5.1")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1824 version ".tar.gz"))
1825 (sha256
1826 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1827 (build-system gnu-build-system)
1828 (arguments
1829 `(#:configure-flags
1830 (list "--enable-notify"))) ; optional libnotify support
1831 (native-inputs
1832 `(("intltool" ,intltool)
1833 ("pkg-config" ,pkg-config)))
1834 (inputs
1835 `(("alsa-lib" ,alsa-lib)
1836 ("gtk+" ,gtk+)
1837 ("libnotify" ,libnotify)))
1838 (home-page "http://nullwise.com/volumeicon.html")
1839 (synopsis "System tray volume applet")
1840 (description
1841 "Volume Icon is a volume indicator and control applet for @acronym{the
1842Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1843independent of your desktop environment, and supports global key bindings.")
1844 (license (list license:expat ; src/{bind.c,keybinder.h}
1845 license:isc ; src/alsa_volume_mapping.c
1846 license:gpl3)))) ; the rest & combined work
1847
57d70dba
MIP
1848(define-public yad
1849 (package
1850 (name "yad")
2223cbde 1851 (version "5.0")
57d70dba
MIP
1852 (source
1853 (origin
1854 (method git-fetch)
1855 (uri (git-reference
1856 (url "https://github.com/v1cont/yad.git")
1857 (commit (string-append "v" version))))
1858 (file-name (git-file-name name version))
1859 (sha256
2223cbde
TGR
1860 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1861 (build-system glib-or-gtk-build-system)
57d70dba
MIP
1862 (arguments
1863 `(#:configure-flags
2223cbde
TGR
1864 ;; Passing --enable-foo will silently disable foo if prerequisite
1865 ;; inputs are missing, not abort the build as one might expect.
1866 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1867 ;; present in the past and nobody complained.
1868 '("--enable-icon-browser"
1869 "--enable-spell") ; gspell checking support
57d70dba
MIP
1870 #:phases
1871 (modify-phases %standard-phases
2223cbde 1872 (add-after 'bootstrap 'intltoolize
57d70dba 1873 (lambda _
2223cbde 1874 (invoke "intltoolize" "--force" "--automake"))))))
57d70dba 1875 (inputs
2223cbde
TGR
1876 `(("gspell" ,gspell)
1877 ("gtk+" ,gtk+)))
57d70dba
MIP
1878 (native-inputs
1879 `(("autoconf" ,autoconf)
1880 ("automake" ,automake)
1881 ("intltool" ,intltool)
1882 ("pkg-config" ,pkg-config)))
1883 (home-page "https://sourceforge.net/projects/yad-dialog/")
1884 (synopsis "GTK+ dialog boxes for shell scripts")
1885 (description
1886 "This program allows you to display GTK+ dialog boxes from command line or
1887shell scripts. Example of how to use @code{yad} can be consulted at
1888@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1889 (license license:gpl3+)))
a32ecb50
MP
1890
1891(define-public libdbusmenu
1892 (package
1893 (name "libdbusmenu")
1894 (version "16.04.0")
1895 (source
1896 (origin
1897 (method url-fetch)
1898 (uri (string-append "https://launchpad.net/libdbusmenu/"
1899 (version-major+minor version) "/" version
1900 "/+download/libdbusmenu-" version ".tar.gz"))
1901 (sha256
1902 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1903 (build-system gnu-build-system)
1904 (arguments
1905 `(#:configure-flags
1906 '("--sysconfdir=/etc"
1907 "--localstatedir=/var"
1908 ;; The shebang of the generated test files should be patched before
1909 ;; enabling tests.
1910 "--disable-tests")
1911 #:make-flags
1912 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1913 "/lib/girepository-1.0"))
1914 #:phases
1915 (modify-phases %standard-phases
48a168ff
MB
1916 (add-before 'configure 'do-not-treat-warnings-as-errors
1917 (lambda _
1918 ;; Prevent the build from failing due to deprecation warnings
1919 ;; from newer GLib and GTK versions.
1920 (substitute* (find-files "." "^Makefile.in$")
1921 ((" -Werror")
1922 ""))
1923 #t))
a32ecb50
MP
1924 (add-before 'configure 'set-environment
1925 (lambda _
1926 (setenv "HAVE_VALGRIND_TRUE" "")
1927 (setenv "HAVE_VALGRIND_FALSE" "#")
1928 #t)))))
1929 (inputs
1930 `(("glib" ,glib)
1931 ("gtk+" ,gtk+)
1932 ("gtk+-2" ,gtk+-2)))
1933 (native-inputs
1934 `(("glib:bin" ,glib "bin")
1935 ("gnome-doc-utils" ,gnome-doc-utils)
1936 ("gobject-introspection" ,gobject-introspection)
1937 ("intltool" ,intltool)
1938 ("json-glib" ,json-glib)
1939 ("pkg-config" ,pkg-config)
1940 ("python" ,python-2)
1941 ("vala" ,vala)))
1942 (home-page "https://launchpad.net/libdbusmenu")
1943 (synopsis "Library for passing menus over DBus")
1944 (description "@code{libdbusmenu} passes a menu structure across DBus so
1945that a program can create a menu simply without worrying about how it is
1946displayed on the other side of the bus.")
0dc8c908
LC
1947
1948 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1949 (license (list license:lgpl2.1 license:lgpl3))))
d2793ed6
BT
1950
1951(define-public gtk-layer-shell
1952 (package
1953 (name "gtk-layer-shell")
1954 (version "0.1.0")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
1960 version "/gtk-layer-shell-" version ".tar.xz"))
1961 (sha256
1962 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
1963 (build-system meson-build-system)
1964 (native-inputs `(("pkg-config" ,pkg-config)
1965 ("gobject-introspection" ,gobject-introspection)))
1966 (inputs `(("wayland" ,wayland)
1967 ("gtk+" ,gtk+)))
1968 (home-page "https://github.com/wmww/gtk-layer-shell")
1969 (synopsis "Library to create Wayland desktop components using the Layer
1970Shell protocol")
1971 (description "Layer Shell is a Wayland protocol for desktop shell
1972components, such as panels, notifications and wallpapers. It can be used to
1973anchor windows to a corner or edge of the output, or stretch them across the
1974entire output. It supports all Layer Shell features including popups and
1975popovers.")
1976 (license license:expat)))
6eee2f7b
GLV
1977
1978(define-public goocanvas
1979 (package
1980 (name "goocanvas")
1981 (version "2.0.4")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append "mirror://gnome/sources/goocanvas/"
1986 (version-major+minor version)
1987 "/goocanvas-" version ".tar.xz"))
1988 (sha256
1989 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
1990 (build-system gnu-build-system)
1991 (native-inputs
1992 `(("gettext" ,gettext-minimal)
1993 ("glib-bin" ,glib "bin")
1994 ("gobject-introspection" ,gobject-introspection)
1995 ("gtk-doc" ,gtk-doc)
1996 ("pkg-config" ,pkg-config)
1997 ("python" ,python)))
1998 (inputs
1999 `(("cairo" ,cairo)
2000 ("glib" ,glib)
2001 ("gtk+" ,gtk+)
2002 ("python-pygobject" ,python-pygobject)))
2003 (arguments
2004 `(#:configure-flags '("--disable-rebuilds"
2005 "--disable-static")
2006 #:phases
2007 (modify-phases %standard-phases
2008 (add-after 'unpack 'fix-install-path
2009 (lambda* (#:key inputs outputs #:allow-other-keys)
2010 (substitute* "configure"
2011 (("\\(gi._overridesdir\\)")
2012 (string-append "((gi._overridesdir).replace(\\\""
2013 (assoc-ref inputs "python-pygobject")
2014 "\\\", \\\""
2015 (assoc-ref outputs "out")
2016 "\\\"))")))
2017 #t)))))
2018 (synopsis "Canvas widget for GTK+")
2019 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2020library for drawing.")
2021 (home-page "https://wiki.gnome.org/GooCanvas")
2022 (license license:lgpl2.0)))
81583442
AI
2023
2024(define-public gtksheet
2025 (package
2026 (name "gtksheet")
2027 (version "4.3.4")
2028 (source
2029 (origin
2030 (method git-fetch)
2031 (uri (git-reference
2032 (url "https://github.com/fpaquet/gtksheet")
2033 (commit (string-append "V" version))))
2034 (file-name (git-file-name name version))
2035 (sha256
2036 (base32
2037 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2038 (build-system gnu-build-system)
2039 (arguments
2040 `(#:configure-flags (list "--enable-glade"
2041 "--enable-introspection")
2042 #:phases
2043 (modify-phases %standard-phases
2044 ;; The "configure" script is present, but otherwise the project is
2045 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2046 ;; will take over.
2047 (add-after 'unpack 'delete-configure
2048 (lambda _
2049 (delete-file "configure")
2050 #t))
2051 ;; Fix glade install directories.
2052 (add-before 'bootstrap 'configure-glade-directories
2053 (lambda* (#:key outputs #:allow-other-keys)
2054 (substitute* "configure.ac"
2055 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2056 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2057 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2058 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2059 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2060 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2061 #t))
2062 ;; Fix incorrect typelib version. This is a known upstream bug. See
2063 ;; https://github.com/fpaquet/gtksheet/issues/23
2064 (add-after 'install 'fix-typelib-version
2065 (lambda* (#:key outputs #:allow-other-keys)
2066 (with-directory-excursion (string-append (assoc-ref outputs "out")
2067 "/lib/girepository-1.0")
2068 (rename-file "GtkSheet-4.0.typelib"
2069 (string-append "GtkSheet-" ,version ".typelib")))
2070 #t)))))
2071 (inputs
2072 `(("glade" ,glade3)
2073 ("glib" ,glib)
2074 ("gtk+" ,gtk+)
2075 ("libxml2" ,libxml2)))
2076 (native-inputs
2077 `(("autoconf" ,autoconf)
2078 ("automake" ,automake)
2079 ("gobject-introspection" ,gobject-introspection)
2080 ("libtool" ,libtool)
2081 ("pkg-config" ,pkg-config)))
2082 (home-page "https://fpaquet.github.io/gtksheet/")
2083 (synopsis "Spreadsheet widget for GTK+")
2084 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2085scrollable grid of cells where you can allocate text. Cell contents can be
2086edited interactively through a specially designed entry, GtkItemEntry. It is
2087also a container subclass, allowing you to display buttons, images and any
2088other widget in it. You can also set many attributes such as border,
2089foreground and background colors, text justification and more.")
2090 (native-search-paths
2091 (list
2092 (search-path-specification
2093 (variable "GLADE_CATALOG_SEARCH_PATH")
2094 (files '("share/glade/catalogs")))
2095 (search-path-specification
2096 (variable "GLADE_MODULE_SEARCH_PATH")
2097 (files '("lib/glade/modules")))))
2098 (license license:lgpl2.0+)))