You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

399 lines
16 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Ludovic Courtès <>
;;; Copyright © 2013 Andreas Enge <>
;;; Copyright © 2013 Nikita Karetnikov <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages glib)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gtk)
#:use-module (gnu packages libffi)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
#:use-module (gnu packages bash)
#:use-module (gnu packages file)
#:use-module (gnu packages xorg)
#:use-module (gnu packages m4)
;; Export variables up-front to allow circular dependency with the 'xorg'
;; module.
#:export (dbus
(define dbus
(name "dbus")
(version "1.6.4")
(source (origin
(method url-fetch)
(string-append ""
version ".tar.gz"))
(patches (list (search-patch "dbus-localstatedir.patch")))))
(build-system gnu-build-system)
'(#:configure-flags (list ;; Install the system bus socket under /var.
;; XXX: Fix the following to allow system-wide
;; config.
;; "--sysconfdir=/etc"
`(("expat" ,expat)
("pkg-config" ,pkg-config)
;; Add a dependency on libx11 so that 'dbus-launch' has support for
;; '--autolaunch'.
("libx11" ,libx11)))
(home-page "")
(synopsis "Message bus for inter-process communication (IPC)")
"D-Bus is a message bus system, a simple way for applications to
talk to one another. In addition to interprocess communication, D-Bus
helps coordinate process lifecycle; it makes it simple and reliable to
code a \"single instance\" application or daemon, and to launch
applications and daemons on demand when their services are needed.
D-Bus supplies both a system daemon (for events such as \"new hardware
device added\" or \"printer queue changed\") and a
per-user-login-session daemon (for general IPC needs among user
applications). Also, the message bus is built on top of a general
one-to-one message passing framework, which can be used by any two apps
to communicate directly (without going through the message bus
daemon). Currently the communicating applications are on one computer,
or through unencrypted TCP/IP suitable for use behind a firewall with
shared NFS home directories.")
(license license:gpl2+))) ; or Academic Free License 2.1
(define glib
(name "glib")
(version "2.40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/"
name "/" (string-take version 4) "/"
name "-" version ".tar.xz"))
(base32 "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd"))
(patches (list (search-patch "glib-tests-homedir.patch")
(search-patch "glib-tests-desktop.patch")
(search-patch "glib-tests-prlimit.patch")
(search-patch "glib-tests-timer.patch")))))
(build-system gnu-build-system)
(outputs '("out" ; everything
"bin" ; glib-mkenums, gtester, etc.; depends on Python
"doc")) ; 20 MiB of GTK-Doc reference
`(("coreutils" ,coreutils)
("libffi" ,libffi)
("zlib" ,zlib)
("tzdata" ,tzdata))) ; for tests/gdatetime.c
`(("gettext" ,gnu-gettext)
("dbus" ,dbus) ; for GDBus tests
("pkg-config" ,pkg-config)
("python" ,python-wrapper)
("perl" ,perl) ; needed by GIO tests
("bash" ,bash)))
'(#:phases (alist-cons-before
'build 'pre-build
(lambda* (#:key inputs outputs #:allow-other-keys)
;; For tests/gdatetime.c.
(setenv "TZDIR"
(string-append (assoc-ref inputs "tzdata")
;; Some tests want write access there.
(setenv "XDG_CACHE_HOME" (getcwd))
(substitute* '("glib/gspawn.c"
(string-append (assoc-ref inputs "bash") "/bin/sh"))))
;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
#:configure-flags (list (string-append "--with-html-dir="
(assoc-ref %outputs "doc")
;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
;; file that gets compiled possibly before it has been fully generated.
#:parallel-tests? #f))
;; This variable is not really "owned" by GLib, but several related
;; packages refer to it: gobject-introspection's tools use it as a search
;; path for .gir files, and it's also a search path for schemas produced
;; by 'glib-compile-schemas'.
(list (search-path-specification
(variable "XDG_DATA_DIRS")
(directories '("share")))))
(search-paths native-search-paths)
(synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
"GLib provides data structure handling for C, portability wrappers,
and interfaces for such runtime functionality as an event loop, threads,
dynamic loading, and an object system.")
(home-page "")
(license license:lgpl2.0+))) ; some files are under lgpl2.1+
(define gobject-introspection
(name "gobject-introspection")
(version "1.38.0")
(source (origin
(method url-fetch)
(uri (string-append ""
(substring version 0 (string-rindex version #\.))
version ".tar.xz"))
(base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m"))
(patches (list (search-patch "gobject-introspection-cc.patch")))))
(build-system gnu-build-system)
`(("bison" ,bison)
("cairo" ,cairo)
("flex" ,flex)
("glib" ,glib)
("pkg-config" ,pkg-config)
("python-2" ,python-2)))
`(("glib" ,glib "bin")))
`(;; In practice, GIR users will need libffi when using
;; gobject-introspection.
("libffi" ,libffi)))
'configure 'patch-paths
(lambda _
(substitute* "giscanner/"
(("GUIX_GCC_PATH") (which "gcc"))))
(home-page "")
(synopsis "Generate interface introspection data for GObject libraries")
"GObject introspection is a middleware layer between C libraries (using
GObject) and language bindings. The C library can be scanned at compile time
and generate a metadata file, in addition to the actual native C library. Then
at runtime, language bindings can read this metadata and automatically provide
bindings to call into the C library.")
; Some bits are distributed under the LGPL2+, others under the GPL2+
(license license:gpl2+)))
(define intltool
(name "intltool")
(version "0.50.2")
(source (origin
(method url-fetch)
(uri (string-append ""
version "/+download/intltool-"
version ".tar.gz"))
(build-system gnu-build-system)
`(;; Propagate gettext because users expect it to be there, and so does
;; the `intltool-update' script.
("gettext" ,gnu-gettext)
;; `file' is used by `intltool-update' too.
("file" ,file)
("perl-xml-parser" ,perl-xml-parser)
("perl" ,perl)))
(home-page "")
(synopsis "Tools to centralise translations of different file formats")
"intltool is a set of tools to centralise translations of many different
file formats using GNU gettext-compatible PO files.
The intltool collection can be used to do these things:
Extract translatable strings from various source files (,
Collect the extracted strings together with messages from traditional
source files (.c, .h) in po/$(PACKAGE).pot.
Merge back the translations from .po files into .xml, .desktop and
oaf files. This merge step will happen at build resp. installation time.")
(license license:gpl2+)))
(define itstool
(name "itstool")
(version "1.2.0")
(source (origin
(method url-fetch)
(uri (string-append ""
version ".tar.bz2"))
(build-system gnu-build-system)
`(("libxml2" ,libxml2)
("python-2" ,python-2)))
(home-page "")
(synopsis "Tool to translate XML documents with PO files")
"ITS Tool allows you to translate your XML documents with PO files, using
rules from the W3C Internationalization Tag Set (ITS) to determine what to
translate and how to separate it into PO file messages.
PO files are the standard translation format for GNU and other Unix-like
systems. They present translatable information as discrete messages, allowing
each message to be translated independently. In contrast to whole-page
translation, translating with a message-based format like PO means you can
easily track changes to the source document down to the paragraph. When new
strings are added or existing strings are modified, you only need to update the
corresponding messages.
ITS Tool is designed to make XML documents translatable through PO files by
applying standard ITS rules, as well as extension rules specific to ITS Tool.
ITS also provides an industry standard way for authors to override translation
information in their documents, such as whether a particular element should be
(license license:gpl3+)))
(define dbus-glib
(name "dbus-glib")
(version "0.100.2")
(source (origin
(method url-fetch)
(string-append ""
version ".tar.gz"))
(build-system gnu-build-system)
`(("dbus" ,dbus)
("expat" ,expat)
("glib" ,glib)))
`(("glib" ,glib "bin")
("pkg-config" ,pkg-config)))
(home-page "")
(synopsis "D-Bus GLib bindings")
"GLib bindings for D-Bus. The package is obsolete and superseded
by GDBus included in Glib.")
(license license:gpl2))) ; or Academic Free License 2.1
(define libsigc++
(name "libsigc++")
(version "2.3.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/libsigc++/2.3/libsigc++-"
version ".tar.xz"))
(build-system gnu-build-system)
(inputs `(("pkg-config" ,pkg-config)))
(native-inputs `(("m4" ,m4)))
(home-page "")
(synopsis "Type-safe callback system for standard C++")
"libsigc++ implements a type-safe callback system for standard C++. It
allows you to define signals and to connect those signals to any callback
function, either global or a member function, regardless of whether it is
static or virtual.
It also contains adaptor classes for connection of dissimilar callbacks and
has an ease of use unmatched by other C++ callback libraries.")
(license license:lgpl2.1+)))
(define glibmm
(name "glibmm")
(version "2.37.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/glibmm/2.37/glibmm-"
version ".tar.xz"))
(build-system gnu-build-system)
`(#:phases (alist-cons-before
'build 'pre-build
(lambda _
;; This test uses /etc/fstab as an example file to read
;; from; choose a better example.
(substitute* "tests/giomm_simple/"
(string-append (getcwd)
;; This test does a DNS lookup, and then expects to be able
;; to open a TLS session; just skip it.
(substitute* "tests/giomm_tls_client/"
"return 77;\n")))
(inputs `(("pkg-config" ,pkg-config)
("glib" ,glib "bin")))
`(("libsigc++" ,libsigc++)
("glib" ,glib)))
(home-page "")
(synopsis "C++ interface to the GLib library")
"glibmm provides a C++ programming interface to the part of GLib that are
useful for C++.")
(license license:lgpl2.1+)))