glib.scm 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  5. ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
  6. ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
  8. ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
  9. ;;; Copyright © 2017 Petter <petter@mykolab.ch>
  10. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  11. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  12. ;;;
  13. ;;; This file is part of GNU Guix.
  14. ;;;
  15. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  16. ;;; under the terms of the GNU General Public License as published by
  17. ;;; the Free Software Foundation; either version 3 of the License, or (at
  18. ;;; your option) any later version.
  19. ;;;
  20. ;;; GNU Guix is distributed in the hope that it will be useful, but
  21. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  22. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. ;;; GNU General Public License for more details.
  24. ;;;
  25. ;;; You should have received a copy of the GNU General Public License
  26. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  27. (define-module (gnu packages glib)
  28. #:use-module (gnu packages)
  29. #:use-module (gnu packages backup)
  30. #:use-module (gnu packages base)
  31. #:use-module (gnu packages bash)
  32. #:use-module (gnu packages bison)
  33. #:use-module (gnu packages check)
  34. #:use-module (gnu packages compression)
  35. #:use-module (gnu packages enlightenment)
  36. #:use-module (gnu packages file)
  37. #:use-module (gnu packages flex)
  38. #:use-module (gnu packages gettext)
  39. #:use-module (gnu packages gnome)
  40. #:use-module (gnu packages gperf)
  41. #:use-module (gnu packages gtk)
  42. #:use-module (gnu packages libffi)
  43. #:use-module (gnu packages linux)
  44. #:use-module (gnu packages m4)
  45. #:use-module (gnu packages nettle)
  46. #:use-module (gnu packages pcre)
  47. #:use-module (gnu packages package-management)
  48. #:use-module (gnu packages perl)
  49. #:use-module (gnu packages perl-check)
  50. #:use-module (gnu packages pkg-config)
  51. #:use-module (gnu packages python)
  52. #:use-module (gnu packages web)
  53. #:use-module (gnu packages xml)
  54. #:use-module (gnu packages xorg)
  55. #:use-module (guix build-system gnu)
  56. #:use-module (guix build-system meson)
  57. #:use-module (guix build-system perl)
  58. #:use-module (guix build-system python)
  59. #:use-module (guix download)
  60. #:use-module ((guix licenses) #:prefix license:)
  61. #:use-module (guix packages)
  62. #:use-module (guix utils)
  63. ;; Export variables up-front to allow circular dependency with the 'xorg'
  64. ;; module.
  65. #:export (dbus
  66. glib
  67. gobject-introspection
  68. dbus-glib
  69. intltool
  70. itstool
  71. libsigc++
  72. glibmm
  73. telepathy-glib
  74. perl-net-dbus
  75. perl-net-dbus-glib))
  76. (define dbus
  77. (package
  78. (name "dbus")
  79. (version "1.12.12")
  80. (source (origin
  81. (method url-fetch)
  82. (uri (string-append
  83. "https://dbus.freedesktop.org/releases/dbus/dbus-"
  84. version ".tar.gz"))
  85. (sha256
  86. (base32
  87. "1y7mxhkw2shd9mi9s62k81lz8npjkrafapr4fyfms7hs04kg4ilm"))
  88. (patches (search-patches "dbus-helper-search-path.patch"))))
  89. (build-system gnu-build-system)
  90. (arguments
  91. '(#:configure-flags
  92. (list
  93. ;; Install the system bus socket under /var.
  94. "--localstatedir=/var"
  95. ;; Install the session bus socket under /tmp.
  96. "--with-session-socket-dir=/tmp"
  97. ;; Use /etc/dbus-1 for system-wide config.
  98. ;; Look for configuration file under
  99. ;; /etc/dbus-1. This is notably required by
  100. ;; 'dbus-daemon-launch-helper', which looks for
  101. ;; the 'system.conf' file in that place,
  102. ;; regardless of what '--config-file' was
  103. ;; passed to 'dbus-daemon' on the command line;
  104. ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
  105. "--sysconfdir=/etc")
  106. #:phases
  107. (modify-phases %standard-phases
  108. (replace 'install
  109. (lambda _
  110. ;; Don't try to create /var and /etc.
  111. (invoke "make"
  112. "localstatedir=/tmp/dummy"
  113. "sysconfdir=/tmp/dummy"
  114. "install"))))))
  115. (native-inputs
  116. `(("pkg-config" ,pkg-config)))
  117. (inputs
  118. `(("expat" ,expat)
  119. ;; Add a dependency on libx11 so that 'dbus-launch' has support for
  120. ;; '--autolaunch'.
  121. ("libx11" ,libx11)))
  122. (home-page "https://www.freedesktop.org/wiki/Software/dbus/")
  123. (synopsis "Message bus for inter-process communication (IPC)")
  124. (description
  125. "D-Bus is a message bus system, a simple way for applications to
  126. talk to one another. In addition to interprocess communication, D-Bus
  127. helps coordinate process lifecycle; it makes it simple and reliable to
  128. code a \"single instance\" application or daemon, and to launch
  129. applications and daemons on demand when their services are needed.
  130. D-Bus supplies both a system daemon (for events such as \"new hardware
  131. device added\" or \"printer queue changed\") and a
  132. per-user-login-session daemon (for general IPC needs among user
  133. applications). Also, the message bus is built on top of a general
  134. one-to-one message passing framework, which can be used by any two apps
  135. to communicate directly (without going through the message bus
  136. daemon). Currently the communicating applications are on one computer,
  137. or through unencrypted TCP/IP suitable for use behind a firewall with
  138. shared NFS home directories.")
  139. (license license:gpl2+))) ; or Academic Free License 2.1
  140. (define glib
  141. (package
  142. (name "glib")
  143. (version "2.56.3")
  144. (source (origin
  145. (method url-fetch)
  146. (uri (string-append "mirror://gnome/sources/"
  147. name "/" (string-take version 4) "/"
  148. name "-" version ".tar.xz"))
  149. (sha256
  150. (base32
  151. "1cjcqz77m62zrx7224vl3f2cxwqf28r5xpqb2jy7av0vr2scb959"))
  152. (patches (search-patches "glib-tests-timer.patch"))))
  153. (build-system gnu-build-system)
  154. (outputs '("out" ; everything
  155. "bin" ; glib-mkenums, gtester, etc.; depends on Python
  156. "doc")) ; 20 MiB of GTK-Doc reference
  157. (propagated-inputs
  158. `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
  159. (inputs
  160. `(("coreutils" ,coreutils)
  161. ("util-linux" ,util-linux) ; for libmount
  162. ("libffi" ,libffi)
  163. ("zlib" ,zlib)))
  164. (native-inputs
  165. `(("gettext" ,gettext-minimal)
  166. ("dbus" ,dbus) ; for GDBus tests
  167. ("pkg-config" ,pkg-config)
  168. ("python" ,python-wrapper)
  169. ("perl" ,perl) ; needed by GIO tests
  170. ("bash" ,bash)
  171. ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
  172. (arguments
  173. `(#:disallowed-references (,tzdata-for-tests)
  174. #:phases
  175. (modify-phases %standard-phases
  176. (add-before 'build 'pre-build
  177. (lambda* (#:key inputs outputs #:allow-other-keys)
  178. ;; For tests/gdatetime.c.
  179. (setenv "TZDIR"
  180. (string-append (assoc-ref inputs "tzdata")
  181. "/share/zoneinfo"))
  182. ;; Some tests want write access there.
  183. (setenv "HOME" (getcwd))
  184. (setenv "XDG_CACHE_HOME" (getcwd))
  185. (substitute* '("glib/gspawn.c"
  186. "glib/tests/utils.c"
  187. "tests/spawn-test.c")
  188. (("/bin/sh")
  189. (string-append (assoc-ref inputs "bash") "/bin/sh")))
  190. #t))
  191. (add-before 'check 'disable-failing-tests
  192. (lambda _
  193. (let ((disable
  194. (lambda (test-file test-paths)
  195. (define pattern+procs
  196. (map (lambda (test-path)
  197. (cons
  198. ;; XXX: only works for single line statements.
  199. (format #f "g_test_add_func.*\"~a\".*" test-path)
  200. (const "")))
  201. test-paths))
  202. (substitute test-file pattern+procs)))
  203. (failing-tests
  204. '(("glib/tests/thread.c"
  205. (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
  206. ;; as found on hydra.gnu.org, and strace(1) doesn't
  207. ;; recognize it.
  208. "/thread/thread4"))
  209. ("glib/tests/timer.c"
  210. (;; fails if compiler optimizations are enabled, which they
  211. ;; are by default.
  212. "/timer/stop"))
  213. ("gio/tests/gapplication.c"
  214. (;; XXX: proven to be unreliable. See:
  215. ;; <https://bugs.debian.org/756273>
  216. ;; <http://bugs.gnu.org/18445>
  217. "/gapplication/quit"
  218. ;; XXX: fails randomly for unknown reason. See:
  219. ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
  220. "/gapplication/local-actions"))
  221. ("gio/tests/contenttype.c"
  222. (;; XXX: requires shared-mime-info.
  223. "/contenttype/guess"
  224. "/contenttype/guess_svg_from_data"
  225. "/contenttype/subtype"
  226. "/contenttype/list"
  227. "/contenttype/icon"
  228. "/contenttype/symbolic-icon"
  229. "/contenttype/tree"))
  230. ("gio/tests/appinfo.c"
  231. (;; XXX: requires update-desktop-database.
  232. "/appinfo/associations"))
  233. ("gio/tests/desktop-app-info.c"
  234. (;; XXX: requires update-desktop-database.
  235. "/desktop-app-info/delete"
  236. "/desktop-app-info/default"
  237. "/desktop-app-info/fallback"
  238. "/desktop-app-info/lastused"
  239. "/desktop-app-info/search"))
  240. ("gio/tests/gdbus-peer.c"
  241. (;; Requires /etc/machine-id.
  242. "/gdbus/codegen-peer-to-peer"))
  243. ("gio/tests/gdbus-unix-addresses.c"
  244. (;; Requires /etc/machine-id.
  245. "/gdbus/x11-autolaunch")))))
  246. (for-each (lambda (x) (apply disable x)) failing-tests)
  247. #t))))
  248. ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
  249. #:configure-flags (list (string-append "--with-html-dir="
  250. (assoc-ref %outputs "doc")
  251. "/share/gtk-doc/html"))
  252. ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
  253. ;; file that gets compiled possibly before it has been fully generated.
  254. #:parallel-tests? #f))
  255. (native-search-paths
  256. ;; This variable is not really "owned" by GLib, but several related
  257. ;; packages refer to it: gobject-introspection's tools use it as a search
  258. ;; path for .gir files, and it's also a search path for schemas produced
  259. ;; by 'glib-compile-schemas'.
  260. (list (search-path-specification
  261. (variable "XDG_DATA_DIRS")
  262. (files '("share")))
  263. ;; To load extra gio modules from glib-networking, etc.
  264. (search-path-specification
  265. (variable "GIO_EXTRA_MODULES")
  266. (files '("lib/gio/modules")))))
  267. (search-paths native-search-paths)
  268. (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
  269. (description
  270. "GLib provides data structure handling for C, portability wrappers,
  271. and interfaces for such runtime functionality as an event loop, threads,
  272. dynamic loading, and an object system.")
  273. (home-page "https://developer.gnome.org/glib/")
  274. (license license:lgpl2.1+)))
  275. (define gobject-introspection
  276. (package
  277. (name "gobject-introspection")
  278. (version "1.56.1")
  279. (source (origin
  280. (method url-fetch)
  281. (uri (string-append "mirror://gnome/sources/"
  282. "gobject-introspection/" (version-major+minor version)
  283. "/gobject-introspection-" version ".tar.xz"))
  284. (sha256
  285. (base32 "0jx2kryjd7l0vl5gb3qp1qjfy3cjiizvcd1snsm7pzwrzz67aa2v"))
  286. (modules '((guix build utils)))
  287. (snippet
  288. '(begin
  289. (substitute* "tools/g-ir-tool-template.in"
  290. (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@"))
  291. #t))
  292. (patches (search-patches
  293. "gobject-introspection-cc.patch"
  294. "gobject-introspection-girepository.patch"
  295. "gobject-introspection-absolute-shlib-path.patch"))))
  296. (build-system gnu-build-system)
  297. (inputs
  298. `(("bison" ,bison)
  299. ("flex" ,flex)
  300. ("glib" ,glib)
  301. ("python-2" ,python-2)))
  302. (native-inputs
  303. `(("glib" ,glib "bin")
  304. ("pkg-config" ,pkg-config)))
  305. (propagated-inputs
  306. `(;; In practice, GIR users will need libffi when using
  307. ;; gobject-introspection.
  308. ("libffi" ,libffi)))
  309. (native-search-paths
  310. (list (search-path-specification
  311. (variable "GI_TYPELIB_PATH")
  312. (files '("lib/girepository-1.0")))))
  313. (search-paths native-search-paths)
  314. (arguments
  315. `(;; The build system has at least one race condition involving Gio-2.0.gir
  316. ;; which causes intermittent failures, as of 1.56.0.
  317. #:parallel-build? #f
  318. ;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
  319. ;; some tests to fail.
  320. #:tests? #f))
  321. (home-page "https://wiki.gnome.org/GObjectIntrospection")
  322. (synopsis "Generate interface introspection data for GObject libraries")
  323. (description
  324. "GObject introspection is a middleware layer between C libraries (using
  325. GObject) and language bindings. The C library can be scanned at compile time
  326. and generate a metadata file, in addition to the actual native C library. Then
  327. at runtime, language bindings can read this metadata and automatically provide
  328. bindings to call into the C library.")
  329. ; Some bits are distributed under the LGPL2+, others under the GPL2+
  330. (license license:gpl2+)))
  331. (define intltool
  332. (package
  333. (name "intltool")
  334. (version "0.51.0")
  335. (source (origin
  336. (method url-fetch)
  337. (uri (string-append "https://launchpad.net/intltool/trunk/"
  338. version "/+download/intltool-"
  339. version ".tar.gz"))
  340. (patches (search-patches "intltool-perl-compatibility.patch"))
  341. (sha256
  342. (base32
  343. "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
  344. (build-system gnu-build-system)
  345. (inputs
  346. `(("file" ,file)))
  347. (propagated-inputs
  348. `(;; Propagate gettext because users expect it to be there, and so does
  349. ;; the `intltool-update' script.
  350. ("gettext" ,gettext-minimal)
  351. ("perl-xml-parser" ,perl-xml-parser)
  352. ("perl" ,perl)))
  353. (arguments
  354. `(#:phases
  355. (modify-phases %standard-phases
  356. (add-after 'unpack 'patch-file-references
  357. (lambda* (#:key inputs #:allow-other-keys)
  358. (let ((file (assoc-ref inputs "file")))
  359. (substitute* "intltool-update.in"
  360. (("`file") (string-append "`" file "/bin/file")))
  361. #t))))))
  362. (home-page "https://launchpad.net/intltool/+download")
  363. (synopsis "Tools to centralise translations of different file formats")
  364. (description
  365. "Intltool is a set of tools to centralise translations of many different
  366. file formats using GNU gettext-compatible PO files.
  367. The intltool collection can be used to do these things:
  368. Extract translatable strings from various source files (.xml.in,
  369. glade, .desktop.in, .server.in, .oaf.in).
  370. Collect the extracted strings together with messages from traditional
  371. source files (.c, .h) in po/$(PACKAGE).pot.
  372. Merge back the translations from .po files into .xml, .desktop and
  373. oaf files. This merge step will happen at build resp. installation time.")
  374. (license license:gpl2+)))
  375. (define itstool
  376. (package
  377. (name "itstool")
  378. (version "2.0.2")
  379. (source (origin
  380. (method url-fetch)
  381. (uri (string-append "http://files.itstool.org/itstool/itstool-"
  382. version ".tar.bz2"))
  383. (sha256
  384. (base32
  385. "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
  386. (build-system gnu-build-system)
  387. (inputs
  388. `(("libxml2" ,libxml2)
  389. ("python2-libxml2" ,python2-libxml2)
  390. ("python-2" ,python-2)))
  391. (arguments
  392. '(#:phases
  393. (modify-phases %standard-phases
  394. (add-after 'install 'wrap-program
  395. (lambda* (#:key outputs #:allow-other-keys)
  396. (let ((prog (string-append (assoc-ref outputs "out")
  397. "/bin/itstool")))
  398. (wrap-program prog
  399. `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
  400. #t))))))
  401. (home-page "http://www.itstool.org")
  402. (synopsis "Tool to translate XML documents with PO files")
  403. (description
  404. "ITS Tool allows you to translate your XML documents with PO files, using
  405. rules from the W3C Internationalization Tag Set (ITS) to determine what to
  406. translate and how to separate it into PO file messages.
  407. PO files are the standard translation format for GNU and other Unix-like
  408. systems. They present translatable information as discrete messages, allowing
  409. each message to be translated independently. In contrast to whole-page
  410. translation, translating with a message-based format like PO means you can
  411. easily track changes to the source document down to the paragraph. When new
  412. strings are added or existing strings are modified, you only need to update the
  413. corresponding messages.
  414. ITS Tool is designed to make XML documents translatable through PO files by
  415. applying standard ITS rules, as well as extension rules specific to ITS Tool.
  416. ITS also provides an industry standard way for authors to override translation
  417. information in their documents, such as whether a particular element should be
  418. translated.")
  419. (license license:gpl3+)))
  420. (define dbus-glib
  421. (package
  422. (name "dbus-glib")
  423. (version "0.108")
  424. (source (origin
  425. (method url-fetch)
  426. (uri
  427. (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
  428. version ".tar.gz"))
  429. (sha256
  430. (base32
  431. "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
  432. (build-system gnu-build-system)
  433. (propagated-inputs ; according to dbus-glib-1.pc
  434. `(("dbus" ,dbus)
  435. ("glib" ,glib)))
  436. (inputs
  437. `(("expat" ,expat)))
  438. (native-inputs
  439. `(("glib" ,glib "bin")
  440. ("pkg-config" ,pkg-config)))
  441. (home-page "https://dbus.freedesktop.org/doc/dbus-glib/")
  442. (synopsis "D-Bus GLib bindings")
  443. (description
  444. "GLib bindings for D-Bus. The package is obsolete and superseded
  445. by GDBus included in Glib.")
  446. (license license:gpl2))) ; or Academic Free License 2.1
  447. (define libsigc++
  448. (package
  449. (name "libsigc++")
  450. (version "2.10.1")
  451. (source (origin
  452. (method url-fetch)
  453. (uri (string-append "mirror://gnome/sources/libsigc++/"
  454. (version-major+minor version) "/"
  455. name "-" version ".tar.xz"))
  456. (sha256
  457. (base32
  458. "00v08km4wwzbh6vjxb21388wb9dm6g2xh14rgwabnv4c2wk5z8n9"))))
  459. (build-system gnu-build-system)
  460. (native-inputs `(("pkg-config" ,pkg-config)
  461. ("m4" ,m4)))
  462. (home-page "http://libsigc.sourceforge.net/")
  463. (synopsis "Type-safe callback system for standard C++")
  464. (description
  465. "Libsigc++ implements a type-safe callback system for standard C++. It
  466. allows you to define signals and to connect those signals to any callback
  467. function, either global or a member function, regardless of whether it is
  468. static or virtual.
  469. It also contains adaptor classes for connection of dissimilar callbacks and
  470. has an ease of use unmatched by other C++ callback libraries.")
  471. (license license:lgpl2.1+)))
  472. (define glibmm
  473. (package
  474. (name "glibmm")
  475. (version "2.54.1")
  476. (source (origin
  477. (method url-fetch)
  478. (uri (string-append "mirror://gnome/sources/glibmm/"
  479. (version-major+minor version)
  480. "/glibmm-" version ".tar.xz"))
  481. (sha256
  482. (base32
  483. "0jkapw18icz59cmlmsl00nwwz0wh291kb4hc9z9hxmq45drqrhkw"))))
  484. (build-system gnu-build-system)
  485. (arguments
  486. `(;; XXX: Some tests uses C++14 features. Remove this when the default
  487. ;; compiler is >= GCC6.
  488. #:configure-flags '("CXXFLAGS=-std=gnu++14")
  489. #:phases
  490. (modify-phases %standard-phases
  491. (add-before 'build 'pre-build
  492. (lambda _
  493. ;; This test uses /etc/fstab as an example file to read
  494. ;; from; choose a better example.
  495. (substitute* "tests/giomm_simple/main.cc"
  496. (("/etc/fstab")
  497. (string-append (getcwd)
  498. "/tests/giomm_simple/main.cc")))
  499. ;; This test does a DNS lookup, and then expects to be able
  500. ;; to open a TLS session; just skip it.
  501. (substitute* "tests/giomm_tls_client/main.cc"
  502. (("Gio::init.*$")
  503. "return 77;\n"))
  504. #t)))))
  505. (native-inputs `(("pkg-config" ,pkg-config)
  506. ("glib" ,glib "bin")))
  507. (propagated-inputs
  508. `(("libsigc++" ,libsigc++)
  509. ("glib" ,glib)))
  510. (home-page "https://gtkmm.org/")
  511. (synopsis "C++ interface to the GLib library")
  512. (description
  513. "Glibmm provides a C++ programming interface to the part of GLib that are
  514. useful for C++.")
  515. (license license:lgpl2.1+)))
  516. (define-public python2-pygobject-2
  517. (package
  518. (name "python2-pygobject")
  519. ;; This was the last version to declare the 2.0 platform number, i.e. its
  520. ;; pkg-config files were named pygobject-2.0.pc
  521. (version "2.28.7")
  522. (source
  523. (origin
  524. (method url-fetch)
  525. (uri (string-append "mirror://gnome/sources/pygobject/"
  526. (version-major+minor version)
  527. "/pygobject-" version ".tar.xz"))
  528. (sha256
  529. (base32
  530. "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"))
  531. (patches (search-patches
  532. "python2-pygobject-2-gi-info-type-error-domain.patch"))))
  533. (build-system gnu-build-system)
  534. (native-inputs
  535. `(("which" ,which)
  536. ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
  537. ("pkg-config" ,pkg-config)
  538. ("dbus" ,dbus))) ;for tests
  539. (inputs
  540. `(("python" ,python-2)
  541. ("glib" ,glib)
  542. ("python2-pycairo" ,python2-pycairo)
  543. ("gobject-introspection" ,gobject-introspection)))
  544. (propagated-inputs
  545. `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
  546. (arguments
  547. `(#:tests? #f ;segfaults during tests
  548. #:configure-flags '("LIBS=-lcairo-gobject")))
  549. (home-page "https://pypi.python.org/pypi/PyGObject")
  550. (synopsis "Python bindings for GObject")
  551. (description
  552. "Python bindings for GLib, GObject, and GIO.")
  553. (license license:lgpl2.1+)))
  554. (define-public python-pygobject
  555. (package
  556. (name "python-pygobject")
  557. (version "3.28.3")
  558. (source
  559. (origin
  560. (method url-fetch)
  561. (uri (string-append "mirror://gnome/sources/pygobject/"
  562. (version-major+minor version)
  563. "/pygobject-" version ".tar.xz"))
  564. (sha256
  565. (base32
  566. "1c6h3brzlyvzbpdsammnd957azmp6cbzqrd65r400vnh2l8f5lrx"))))
  567. (build-system gnu-build-system)
  568. (arguments
  569. `(#:phases
  570. (modify-phases %standard-phases
  571. (add-after 'unpack 'delete-broken-tests
  572. (lambda _
  573. ;; FIXME: this test freezes and times out.
  574. (delete-file "tests/test_mainloop.py")
  575. ;; FIXME: this test fails with this kind of error:
  576. ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
  577. (delete-file "tests/test_ossig.py")
  578. #t)))))
  579. (native-inputs
  580. `(("which" ,which)
  581. ;for tests: dbus-run-session and glib-compile-schemas
  582. ("dbus" ,dbus)
  583. ("glib-bin" ,glib "bin")
  584. ("pkg-config" ,pkg-config)
  585. ("python-pytest" ,python-pytest)))
  586. (inputs
  587. `(("python" ,python)
  588. ("python-pycairo" ,python-pycairo)
  589. ("gobject-introspection" ,gobject-introspection)))
  590. (propagated-inputs
  591. ;; pygobject-3.0.pc refers to all these.
  592. `(("glib" ,glib)
  593. ("libffi" ,libffi)))
  594. ;; For finding typelib files, since gobject-introscpetion isn't propagated.
  595. (native-search-paths (package-native-search-paths gobject-introspection))
  596. (home-page "https://live.gnome.org/PyGObject")
  597. (synopsis "Python bindings for GObject")
  598. (description
  599. "Python bindings for GLib, GObject, and GIO.")
  600. (license license:lgpl2.1+)
  601. (properties `((python2-variant . ,(delay python2-pygobject))))))
  602. (define-public python2-pygobject
  603. (package (inherit (strip-python2-variant python-pygobject))
  604. (name "python2-pygobject")
  605. (inputs
  606. `(("python" ,python-2)
  607. ("python-pycairo" ,python2-pycairo)
  608. ("gobject-introspection" ,gobject-introspection)))
  609. (native-inputs
  610. `(("which" ,which)
  611. ;for tests: dbus-run-session and glib-compile-schemas
  612. ("dbus" ,dbus)
  613. ("glib-bin" ,glib "bin")
  614. ("pkg-config" ,pkg-config)
  615. ("python-pytest" ,python2-pytest)))))
  616. (define-public perl-glib
  617. (package
  618. (name "perl-glib")
  619. (version "1.327")
  620. (source (origin
  621. (method url-fetch)
  622. (uri (string-append
  623. "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
  624. version ".tar.gz"))
  625. (sha256
  626. (base32
  627. "0n7hjhbh5xhagvb0qjwzg21j22ks0csah0chgk98g4wnfllxjl0k"))))
  628. (build-system perl-build-system)
  629. (native-inputs
  630. `(("perl-extutils-depends" ,perl-extutils-depends)
  631. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
  632. (inputs
  633. `(("glib" ,glib)))
  634. (home-page "https://metacpan.org/release/Glib")
  635. (synopsis "Perl wrappers for the GLib utility and Object libraries")
  636. (description "This module provides perl access to GLib and GLib's GObject
  637. libraries. GLib is a portability and utility library; GObject provides a
  638. generic type system with inheritance and a powerful signal system. Together
  639. these libraries are used as the foundation for many of the libraries that make
  640. up the Gnome environment, and are used in many unrelated projects.")
  641. (license license:lgpl2.1+)))
  642. (define telepathy-glib
  643. (package
  644. (name "telepathy-glib")
  645. (version "0.24.1")
  646. (source
  647. (origin
  648. (method url-fetch)
  649. (uri
  650. (string-append
  651. "https://telepathy.freedesktop.org/releases/telepathy-glib/"
  652. "telepathy-glib-" version ".tar.gz"))
  653. (sha256
  654. (base32
  655. "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
  656. (patches
  657. (list
  658. ;; Don't use the same test name for multiple tests.
  659. ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
  660. (origin
  661. (method url-fetch)
  662. (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
  663. (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
  664. (sha256
  665. (base32
  666. "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
  667. (build-system gnu-build-system)
  668. (arguments
  669. '(#:configure-flags '("--enable-vala-bindings")
  670. ;; '../tools/glib-*.py' generate files but the target dependencies are
  671. ;; (presumably) not fully specified in the makefile, leading to
  672. ;; parallel build errors like:
  673. ;;
  674. ;; EOFError: EOF read where object expected
  675. ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1
  676. #:parallel-build? #f))
  677. (native-inputs
  678. `(("glib" ,glib "bin") ; uses glib-mkenums
  679. ("gobject-introspection" ,gobject-introspection)
  680. ("pkg-config" ,pkg-config)
  681. ("python" ,python-2)
  682. ("vala" ,vala)
  683. ("xsltproc" ,libxslt)))
  684. (propagated-inputs
  685. ;; There are all in the Requires.private field of telepathy-glib.pc.
  686. `(("dbus" ,dbus)
  687. ("dbus-glib" ,dbus-glib)
  688. ("glib" ,glib)))
  689. (home-page "https://telepathy.freedesktop.org/wiki/")
  690. (synopsis "GLib Real-time communications framework over D-Bus")
  691. (description "Telepathy is a flexible, modular communications framework
  692. that enables real-time communication over D-Bus via pluggable protocol
  693. backends. Telepathy is a communications service that can be accessed by
  694. many applications simultaneously.
  695. This package provides the library for GLib applications.")
  696. (license license:lgpl2.1+)))
  697. (define-public dbus-c++
  698. (package
  699. (name "dbus-c++")
  700. (version "0.9.0")
  701. (source (origin
  702. (method url-fetch)
  703. (uri
  704. (string-append
  705. "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
  706. version "/libdbus-c%2B%2B-" version ".tar.gz"))
  707. (file-name (string-append name "-" version ".tar.gz"))
  708. (sha256
  709. (base32
  710. "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
  711. (build-system gnu-build-system)
  712. (propagated-inputs
  713. `(("dbus" ,dbus))) ;mentioned in the pkg-config file
  714. (inputs
  715. `(("efl" ,efl)
  716. ("expat" ,expat)
  717. ("glib" ,glib)))
  718. (native-inputs
  719. `(("pkg-config" ,pkg-config)))
  720. (arguments
  721. `(;; The 'configure' machinery fails to detect that it needs -lpthread.
  722. #:configure-flags (list "LDFLAGS=-lpthread")
  723. #:phases
  724. (modify-phases %standard-phases
  725. (add-before 'configure 'add-missing-header
  726. (lambda _
  727. (substitute* "include/dbus-c++/eventloop-integration.h"
  728. (("#include <errno.h>")
  729. "#include <errno.h>\n#include <unistd.h>")))))))
  730. (synopsis "D-Bus API for C++")
  731. (description "This package provides D-Bus client API bindings for the C++
  732. programming langauage. It also contains the utility
  733. @command{dbuscxx-xml2cpp}.")
  734. (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
  735. (license license:lgpl2.1+)))
  736. (define-public appstream-glib
  737. (package
  738. (name "appstream-glib")
  739. (version "0.7.14")
  740. (source (origin
  741. (method url-fetch)
  742. (uri (string-append "https://people.freedesktop.org/~hughsient/"
  743. "appstream-glib/releases/"
  744. "appstream-glib-" version ".tar.xz"))
  745. (sha256
  746. (base32
  747. "0n0s99jmx2sx5895lcvmfjwa9r0f06i71495dpn9v9frz4asvk3d"))))
  748. (build-system meson-build-system)
  749. (native-inputs
  750. `(("gettext" ,gettext-minimal)
  751. ("glib:bin" ,glib "bin") ; for glib-compile-resources
  752. ("pkg-config" ,pkg-config)))
  753. (propagated-inputs
  754. `(("gcab" ,gcab) ; for .pc file
  755. ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
  756. ("util-linux" ,util-linux))) ; for .pc file
  757. (inputs
  758. `(("glib" ,glib)
  759. ("gperf" ,gperf)
  760. ("gtk+" ,gtk+)
  761. ("json-glib" ,json-glib)
  762. ("libarchive" ,libarchive)
  763. ("libsoup" ,libsoup)
  764. ("libyaml" ,libyaml)))
  765. (arguments
  766. `(#:configure-flags
  767. (list "-Ddep11=false"
  768. "-Dintrospection=false" ; avoid g-ir-scanner dependency
  769. "-Drpm=false"
  770. "-Dstemmer=false")
  771. #:phases
  772. (modify-phases %standard-phases
  773. (add-after 'unpack 'patch-tests
  774. (lambda _
  775. (substitute* "libappstream-glib/as-self-test.c"
  776. (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
  777. #t)))))
  778. (home-page "https://github.com/hughsie/appstream-glib")
  779. (synopsis "Library for reading and writing AppStream metadata")
  780. (description "This library provides objects and helper methods to help
  781. reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
  782. metadata.")
  783. (license license:lgpl2.1+)))
  784. (define perl-net-dbus
  785. (package
  786. (name "perl-net-dbus")
  787. (version "1.1.0")
  788. (source
  789. (origin
  790. (method url-fetch)
  791. (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
  792. version ".tar.gz"))
  793. (sha256
  794. (base32
  795. "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
  796. (build-system perl-build-system)
  797. (native-inputs
  798. `(("pkg-config" ,pkg-config)
  799. ("perl-test-pod" ,perl-test-pod)
  800. ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
  801. (inputs
  802. `(("dbus" ,dbus)))
  803. (propagated-inputs
  804. `(("perl-xml-twig" ,perl-xml-twig)))
  805. (home-page "https://metacpan.org/release/Net-DBus")
  806. (synopsis "Extension for the DBus bindings")
  807. (description "@code{Net::DBus} provides a Perl XS API to the DBus
  808. inter-application messaging system. The Perl API covers the core base level
  809. of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
  810. (license license:perl-license)))
  811. (define perl-net-dbus-glib
  812. (package
  813. (name "perl-net-dbus-glib")
  814. (version "0.33.0")
  815. (source
  816. (origin
  817. (method url-fetch)
  818. (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
  819. "Net-DBus-GLib-" version ".tar.gz"))
  820. (sha256
  821. (base32
  822. "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
  823. (build-system perl-build-system)
  824. (native-inputs
  825. `(("pkg-config" ,pkg-config)))
  826. (inputs
  827. `(("dbus-glib" ,dbus-glib)))
  828. (home-page "https://metacpan.org/release/Net-DBus-GLib")
  829. (synopsis "Perl extension for the DBus GLib bindings")
  830. (description "This package provides an extension to the @code{Net::DBus}
  831. module allowing integration with the GLib mainloop. To integrate with the
  832. main loop, simply get a connection to the bus via the methods in
  833. @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
  834. other API remains the same.")
  835. (license license:gpl2+)))