build: container: Add #:host-uids argument to call-with-container.
[jackhill/guix/guix.git] / gnu / packages / freedesktop.scm
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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
49
50 (define-public xdg-utils
51 (package
52 (name "xdg-utils")
53 (version "1.0.2")
54 (source
55 (origin
56 (method url-fetch)
57 (uri (string-append
58 "http://portland.freedesktop.org/download/xdg-utils-"
59 version ".tgz"))
60 (sha256
61 (base32
62 "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1"))))
63 (build-system gnu-build-system)
64 (arguments
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)))
72
73 (define-public libinput
74 (package
75 (name "libinput")
76 (version "0.14.1")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "http://freedesktop.org/software/libinput/"
80 name "-" version ".tar.xz"))
81 (sha256
82 (base32
83 "0r0v5jqbnwgndq6ns3ss3kv1438ny302m7bg1najcl1dpqp21v9b"))))
84 (build-system gnu-build-system)
85 (native-inputs
86 `(("pkg-config" ,pkg-config)))
87 (propagated-inputs
88 `(("libudev" ,eudev))) ; required by libinput.pc
89 (inputs
90 `(("libevdev" ,libevdev)
91 ("mtdev" ,mtdev)))
92 (home-page "http://www.freedesktop.org/wiki/Software/libinput/")
93 (synopsis "Input devices handling library")
94 (description
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)))
98
99 (define-public libxdg-basedir
100 (package
101 (name "libxdg-basedir")
102 (version "1.2.0")
103 (source (origin
104 (method url-fetch)
105 (uri (string-append
106 "https://github.com/devnev/libxdg-basedir/archive/"
107 name "-" version ".tar.gz"))
108 (sha256
109 (base32
110 "0s28c7sfwqimsmb3kn91mx7wi55fs3flhbmynl9k60rrllr00aqw"))))
111 (build-system gnu-build-system)
112 (arguments
113 '(#:phases
114 (modify-phases %standard-phases
115 (add-after 'unpack 'autogen
116 (lambda _
117 ;; Run 'configure' in its own phase, not now.
118 (substitute* "autogen.sh"
119 (("^.*\\./configure.*") ""))
120 (zero? (system* "sh" "autogen.sh")))))))
121 (native-inputs
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")
127 (description
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)))
131
132 (define-public elogind
133 (let ((commit "14405a9"))
134 (package
135 (name "elogind")
136 (version (string-append "219." commit))
137 (source (origin
138 (method git-fetch)
139 (uri (git-reference
140 (url "http://git.elephly.net/software/elogind.git")
141 (commit commit)))
142 (sha256
143 (base32
144 "1wz5lxj95qg64x2q5hf4zcb35hpxlw3wfswx6sb2srvsg50y3y72"))
145 (file-name (string-append name "-checkout-" commit))
146 (modules '((guix build utils)))
147 (snippet
148 '(begin
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)
155 (arguments
156 `(#:configure-flags
157 (list
158 ;; pam_elogind fails because of bus-error.c hackery
159 "--disable-pam"
160 (string-append "--with-rootprefix=" (assoc-ref %outputs "out")))
161 #:phases
162 (modify-phases %standard-phases
163 (add-after 'unpack 'autogen
164 (lambda _
165 (and (zero? (system* "intltoolize" "--force" "--automake"))
166 (zero? (system* "autoreconf" "-vif"))))))))
167 (native-inputs
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)
177 ("libtool" ,libtool)
178 ("gperf" ,gperf)))
179 (inputs
180 `(("linux-pam" ,linux-pam)
181 ("linux-libre-headers" ,linux-libre-headers)
182 ("libcap" ,libcap)
183 ("dbus" ,dbus)
184 ("eudev" ,eudev)))
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+))))
192
193 (define-public python-pyxdg
194 (package
195 (name "python-pyxdg")
196 (version "0.25")
197 (source
198 (origin
199 (method url-fetch)
200 (uri (string-append
201 "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
202 version ".tar.gz"))
203 (sha256
204 (base32
205 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
206 (build-system python-build-system)
207 (arguments
208 '(#:phases
209 (alist-replace
210 'check
211 (lambda* (#:key inputs #:allow-other-keys)
212 (setenv "XDG_DATA_DIRS"
213 (string-append (assoc-ref inputs "shared-mime-info")
214 "/share/"))
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")))
219
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")))
225 %standard-phases)))
226 (native-inputs
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")
233 (description
234 "PyXDG is a collection of implementations of freedesktop.org standards in
235 Python.")
236 (license license:lgpl2.0)))
237
238 (define-public python2-pyxdg
239 (package-with-python2 python-pyxdg))
240
241 (define-public wayland
242 (package
243 (name "wayland")
244 (version "1.8.1")
245 (source (origin
246 (method url-fetch)
247 (uri (string-append "http://wayland.freedesktop.org/releases/"
248 name "-" version ".tar.xz"))
249 (sha256
250 (base32
251 "1j3gfzn8i0xhk3j34mwb2srrscjxfyi279jhyq80mz943j6r6z7i"))))
252 (build-system gnu-build-system)
253 (native-inputs
254 `(("doxygen" ,doxygen)
255 ("pkg-config" ,pkg-config)
256 ("xmlto" ,xmlto)
257 ("xsltproc" ,libxslt)))
258 (inputs
259 `(("docbook-xml" ,docbook-xml)
260 ("docbook-xsl" ,docbook-xsl)
261 ("expat" ,expat)
262 ("libffi" ,libffi)
263 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
264 (home-page "http://wayland.freedesktop.org/")
265 (synopsis "Display server protocol")
266 (description
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)))
273
274 (define-public exempi
275 (package
276 (name "exempi")
277 (version "2.2.2")
278 (source (origin
279 (method url-fetch)
280 (uri (string-append
281 "http://libopenraw.freedesktop.org/download/"
282 name "-" version ".tar.bz2"))
283 (sha256
284 (base32
285 "01vcd1mfn2s0iiq2cjyzgvnxx6kcq9cwra1iipijhs0vwvjx0yhf"))))
286 (build-system gnu-build-system)
287 (arguments
288 `(#:configure-flags (list (string-append "--with-boost="
289 (assoc-ref %build-inputs "boost")))))
290 (native-inputs
291 `(("boost" ,boost))) ; tests
292 (inputs
293 `(("expat" ,expat)
294 ("zlib" ,zlib)))
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)))
300
301 (define-public libatasmart
302 (package
303 (name "libatasmart")
304 (version "0.19")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "http://0pointer.de/public/"
308 name "-" version ".tar.xz"))
309 (sha256
310 (base32
311 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
312 (build-system gnu-build-system)
313 (native-inputs
314 `(("pkg-config" ,pkg-config)))
315 (inputs
316 `(("udev" ,eudev)))
317 (home-page "http://0pointer.de/blog/projects/being-smart.html")
318 (synopsis "ATA S.M.A.R.T. reading and parsing library")
319 (description
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+)))
323
324 (define-public udisks
325 (package
326 (name "udisks")
327 (version "2.1.6")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "http://udisks.freedesktop.org/releases/"
331 name "-" version ".tar.bz2"))
332 (sha256
333 (base32
334 "0spl155k0g2l2hvqf8xyjv08i68gfyhzpjva6cwlzxx0bz4gbify"))))
335 (build-system gnu-build-system)
336 (native-inputs
337 `(("glib:bin" ,glib "bin") ; for glib-mkenums
338 ("gobject-introspection" ,gobject-introspection)
339 ("intltool" ,intltool)
340 ("pkg-config" ,pkg-config)
341 ("xsltproc" ,libxslt)))
342 (propagated-inputs
343 `(("glib" ,glib))) ; required by udisks2.pc
344 (inputs
345 `(("acl" ,acl)
346 ("libatasmart" ,libatasmart)
347 ("libgudev" ,libgudev)
348 ("polkit" ,polkit)))
349 (arguments
350 `(#:tests? #f ; requiring system message dbus
351 #:configure-flags
352 (list "--disable-man"
353 "--localstatedir=/var"
354 (string-append "--with-udevdir=" %output "/lib/udev"))
355 #:phases
356 (modify-phases %standard-phases
357 (add-before
358 'configure 'fix-girdir
359 (lambda _
360 ;; Install introspection data to its own output.
361 (substitute* "udisks/Makefile.in"
362 (("girdir = .*")
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")
368 (description
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
372 message bus.")
373 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
374 (license (list license:gpl2+ license:lgpl2.0+))))