1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015 Andy Wingo <wingo@pobox.com>
5 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages freedesktop)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages gperf)
38 #:use-module (gnu packages xml)
39 #:use-module (gnu packages docbook)
40 #:use-module (gnu packages glib) ;intltool
41 #:use-module (gnu packages xdisorg)
42 #:use-module (gnu packages xorg)
43 #:use-module (gnu packages boost)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages doxygen)
46 #:use-module (gnu packages libffi)
47 #:use-module (gnu packages acl)
48 #:use-module (gnu packages polkit))
50 (define-public xdg-utils
58 "http://portland.freedesktop.org/download/xdg-utils-"
62 "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1"))))
63 (build-system gnu-build-system)
65 `(#:tests? #f)) ; no check target
66 (home-page "http://portland.freedesktop.org/")
67 (synopsis "Freedesktop.org scripts for desktop integration")
68 (description "The xdg-utils package is a set of simple scripts that
69 provide basic desktop integration functions in the framework of the
70 freedesktop.org project.")
71 (license license:expat)))
73 (define-public libinput
79 (uri (string-append "http://freedesktop.org/software/libinput/"
80 name "-" version ".tar.xz"))
83 "0r0v5jqbnwgndq6ns3ss3kv1438ny302m7bg1najcl1dpqp21v9b"))))
84 (build-system gnu-build-system)
86 `(("pkg-config" ,pkg-config)))
88 `(("libudev" ,eudev))) ; required by libinput.pc
90 `(("libevdev" ,libevdev)
92 (home-page "http://www.freedesktop.org/wiki/Software/libinput/")
93 (synopsis "Input devices handling library")
95 "Libinput is a library to handle input devices for display servers and
96 other applications that need to directly deal with input devices.")
97 (license license:x11)))
99 (define-public libxdg-basedir
101 (name "libxdg-basedir")
106 "https://github.com/devnev/libxdg-basedir/archive/"
107 name "-" version ".tar.gz"))
110 "0s28c7sfwqimsmb3kn91mx7wi55fs3flhbmynl9k60rrllr00aqw"))))
111 (build-system gnu-build-system)
114 (modify-phases %standard-phases
115 (add-after 'unpack 'autogen
117 ;; Run 'configure' in its own phase, not now.
118 (substitute* "autogen.sh"
119 (("^.*\\./configure.*") ""))
120 (zero? (system* "sh" "autogen.sh")))))))
122 `(("autoconf" ,autoconf)
123 ("automake" ,automake)
124 ("libtool" ,libtool)))
125 (home-page "https://github.com/devnev/libxdg-basedir")
126 (synopsis "Implementation of the XDG Base Directory specification")
128 "libxdg-basedir is a C library providing some functions to use with
129 the freedesktop.org XDG Base Directory specification.")
130 (license license:expat)))
132 (define-public elogind
133 (let ((commit "14405a9"))
136 (version (string-append "219." commit))
140 (url "http://git.elephly.net/software/elogind.git")
144 "1wz5lxj95qg64x2q5hf4zcb35hpxlw3wfswx6sb2srvsg50y3y72"))
145 (file-name (string-append name "-checkout-" commit))
146 (modules '((guix build utils)))
149 (use-modules (guix build utils))
150 (substitute* "Makefile.am"
151 ;; Avoid validation against DTD because the DTDs for
152 ;; both doctype 4.2 and 4.5 are needed.
153 (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))))))
154 (build-system gnu-build-system)
158 ;; pam_elogind fails because of bus-error.c hackery
160 (string-append "--with-rootprefix=" (assoc-ref %outputs "out")))
162 (modify-phases %standard-phases
163 (add-after 'unpack 'autogen
165 (and (zero? (system* "intltoolize" "--force" "--automake"))
166 (zero? (system* "autoreconf" "-vif"))))))))
168 `(("intltool" ,intltool)
169 ("gettext" ,gnu-gettext)
170 ("docbook-xsl" ,docbook-xsl)
171 ("docbook-xml" ,docbook-xml)
172 ("xsltproc" ,libxslt)
173 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
174 ("pkg-config", pkg-config)
175 ("autoconf" ,autoconf)
176 ("automake" ,automake)
180 `(("linux-pam" ,linux-pam)
181 ("linux-libre-headers" ,linux-libre-headers)
185 (home-page "https://github.com/andywingo/elogind")
186 (synopsis "User, seat, and session management service")
187 (description "Elogind is the systemd project's \"logind\" service,
188 extracted out as a separate project. Elogind integrates with PAM to provide
189 the org.freedesktop.login1 interface over the system bus, allowing other parts
190 of a the system to know what users are logged in, and where.")
191 (license license:lgpl2.1+))))
193 (define-public python-pyxdg
195 (name "python-pyxdg")
201 "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
205 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
206 (build-system python-build-system)
211 (lambda* (#:key inputs #:allow-other-keys)
212 (setenv "XDG_DATA_DIRS"
213 (string-append (assoc-ref inputs "shared-mime-info")
215 (substitute* "test/test-icon.py"
216 (("/usr/share/icons/hicolor/index.theme")
217 (string-append (assoc-ref inputs "hicolor-icon-theme")
218 "/share/icons/hicolor/index.theme")))
220 ;; One test fails with:
221 ;; AssertionError: 'x-apple-ios-png' != 'png'
222 (substitute* "test/test-mime.py"
223 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
224 (zero? (system* "nosetests" "-v")))
227 `(("shared-mime-info" ,shared-mime-info) ;for tests
228 ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
229 ("python-nose" ,python-nose)
230 ("python-setuptools" ,python-setuptools)))
231 (home-page "http://freedesktop.org/wiki/Software/pyxdg")
232 (synopsis "Implementations of freedesktop.org standards in Python")
234 "PyXDG is a collection of implementations of freedesktop.org standards in
236 (license license:lgpl2.0)))
238 (define-public python2-pyxdg
239 (package-with-python2 python-pyxdg))
241 (define-public wayland
247 (uri (string-append "http://wayland.freedesktop.org/releases/"
248 name "-" version ".tar.xz"))
251 "1j3gfzn8i0xhk3j34mwb2srrscjxfyi279jhyq80mz943j6r6z7i"))))
252 (build-system gnu-build-system)
254 `(("doxygen" ,doxygen)
255 ("pkg-config" ,pkg-config)
257 ("xsltproc" ,libxslt)))
259 `(("docbook-xml" ,docbook-xml)
260 ("docbook-xsl" ,docbook-xsl)
263 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
264 (home-page "http://wayland.freedesktop.org/")
265 (synopsis "Display server protocol")
267 "Wayland is a protocol for a compositor to talk to its clients as well as
268 a C library implementation of that protocol. The compositor can be a standalone
269 display server running on Linux kernel modesetting and evdev input devices, an X
270 application, or a wayland client itself. The clients can be traditional
271 applications, X servers (rootless or fullscreen) or other display servers.")
272 (license license:x11)))
274 (define-public exempi
281 "http://libopenraw.freedesktop.org/download/"
282 name "-" version ".tar.bz2"))
285 "01vcd1mfn2s0iiq2cjyzgvnxx6kcq9cwra1iipijhs0vwvjx0yhf"))))
286 (build-system gnu-build-system)
288 `(#:configure-flags (list (string-append "--with-boost="
289 (assoc-ref %build-inputs "boost")))))
291 `(("boost" ,boost))) ; tests
295 (home-page "https://wiki.freedesktop.org/libopenraw/Exempi")
296 (synopsis "XMP metadata handling library")
297 (description "Exempi is an implementation of the Extensible Metadata
298 Platform (XMP), which enables embedding metadata in PDF and image formats.")
299 (license license:bsd-3)))
301 (define-public libatasmart
307 (uri (string-append "http://0pointer.de/public/"
308 name "-" version ".tar.xz"))
311 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
312 (build-system gnu-build-system)
314 `(("pkg-config" ,pkg-config)))
317 (home-page "http://0pointer.de/blog/projects/being-smart.html")
318 (synopsis "ATA S.M.A.R.T. reading and parsing library")
320 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
321 Analysis and Reporting Technology) functionality.")
322 (license license:lgpl2.1+)))
324 (define-public udisks
330 (uri (string-append "http://udisks.freedesktop.org/releases/"
331 name "-" version ".tar.bz2"))
334 "0spl155k0g2l2hvqf8xyjv08i68gfyhzpjva6cwlzxx0bz4gbify"))))
335 (build-system gnu-build-system)
337 `(("glib:bin" ,glib "bin") ; for glib-mkenums
338 ("gobject-introspection" ,gobject-introspection)
339 ("intltool" ,intltool)
340 ("pkg-config" ,pkg-config)
341 ("xsltproc" ,libxslt)))
343 `(("glib" ,glib))) ; required by udisks2.pc
346 ("libatasmart" ,libatasmart)
347 ("libgudev" ,libgudev)
350 `(#:tests? #f ; requiring system message dbus
352 (list "--disable-man"
353 "--localstatedir=/var"
354 (string-append "--with-udevdir=" %output "/lib/udev"))
356 (modify-phases %standard-phases
358 'configure 'fix-girdir
360 ;; Install introspection data to its own output.
361 (substitute* "udisks/Makefile.in"
363 "girdir = $(datadir)/gir-1.0\n")
364 (("typelibsdir = .*")
365 "typelibsdir = $(libdir)/girepository-1.0\n")))))))
366 (home-page "http://www.freedesktop.org/wiki/Software/udisks/")
367 (synopsis "Disk manager service")
369 "UDisks provides interfaces to enumerate and perform operations on disks
370 and storage devices. Any application (including unprivileged ones) can access
371 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
373 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
374 (license (list license:gpl2+ license:lgpl2.0+))))