gnu: Add setBfree.
[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 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages freedesktop)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system python)
30 #:use-module (gnu packages gnome)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages gperf)
37 #:use-module (gnu packages xml)
38 #:use-module (gnu packages docbook)
39 #:use-module (gnu packages glib) ;intltool
40 #:use-module (gnu packages xdisorg)
41 #:use-module (gnu packages xorg)
42 #:use-module (gnu packages doxygen)
43 #:use-module (gnu packages libffi))
44
45 (define-public xdg-utils
46 (package
47 (name "xdg-utils")
48 (version "1.0.2")
49 (source
50 (origin
51 (method url-fetch)
52 (uri (string-append
53 "http://portland.freedesktop.org/download/xdg-utils-"
54 version ".tgz"))
55 (sha256
56 (base32
57 "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1"))))
58 (build-system gnu-build-system)
59 (arguments
60 `(#:tests? #f)) ; no check target
61 (home-page "http://portland.freedesktop.org/")
62 (synopsis "Freedesktop.org scripts for desktop integration")
63 (description "The xdg-utils package is a set of simple scripts that
64 provide basic desktop integration functions in the framework of the
65 freedesktop.org project.")
66 (license license:expat)))
67
68 (define-public libinput
69 (package
70 (name "libinput")
71 (version "0.14.1")
72 (source (origin
73 (method url-fetch)
74 (uri (string-append "http://freedesktop.org/software/libinput/"
75 name "-" version ".tar.xz"))
76 (sha256
77 (base32
78 "0r0v5jqbnwgndq6ns3ss3kv1438ny302m7bg1najcl1dpqp21v9b"))))
79 (build-system gnu-build-system)
80 (native-inputs
81 `(("pkg-config" ,pkg-config)))
82 (propagated-inputs
83 `(("libudev" ,eudev))) ; required by libinput.pc
84 (inputs
85 `(("libevdev" ,libevdev)
86 ("mtdev" ,mtdev)))
87 (home-page "http://www.freedesktop.org/wiki/Software/libinput/")
88 (synopsis "Input devices handling library")
89 (description
90 "Libinput is a library to handle input devices for display servers and
91 other applications that need to directly deal with input devices.")
92 (license license:x11)))
93
94 (define-public elogind
95 (let ((commit "14405a9"))
96 (package
97 (name "elogind")
98 (version (string-append "219." commit))
99 (source (origin
100 (method git-fetch)
101 (uri (git-reference
102 (url "http://git.elephly.net/software/elogind.git")
103 (commit commit)))
104 (sha256
105 (base32
106 "1wz5lxj95qg64x2q5hf4zcb35hpxlw3wfswx6sb2srvsg50y3y72"))
107 (file-name (string-append name "-checkout-" commit))
108 (modules '((guix build utils)))
109 (snippet
110 '(begin
111 (use-modules (guix build utils))
112 (substitute* "Makefile.am"
113 ;; Avoid validation against DTD because the DTDs for
114 ;; both doctype 4.2 and 4.5 are needed.
115 (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))))))
116 (build-system gnu-build-system)
117 (arguments
118 `(#:configure-flags
119 (list
120 ;; pam_elogind fails because of bus-error.c hackery
121 "--disable-pam"
122 (string-append "--with-rootprefix=" (assoc-ref %outputs "out")))
123 #:phases
124 (modify-phases %standard-phases
125 (add-after 'unpack 'autogen
126 (lambda _
127 (and (zero? (system* "intltoolize" "--force" "--automake"))
128 (zero? (system* "autoreconf" "-vif"))))))))
129 (native-inputs
130 `(("intltool" ,intltool)
131 ("gettext" ,gnu-gettext)
132 ("docbook-xsl" ,docbook-xsl)
133 ("docbook-xml" ,docbook-xml)
134 ("xsltproc" ,libxslt)
135 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
136 ("pkg-config", pkg-config)
137 ("autoconf" ,autoconf)
138 ("automake" ,automake)
139 ("libtool" ,libtool)
140 ("gperf" ,gperf)))
141 (inputs
142 `(("linux-pam" ,linux-pam)
143 ("linux-libre-headers" ,linux-libre-headers)
144 ("libcap" ,libcap)
145 ("dbus" ,dbus)
146 ("eudev" ,eudev)))
147 (home-page "https://github.com/andywingo/elogind")
148 (synopsis "User, seat, and session management service")
149 (description "Elogind is the systemd project's \"logind\" service,
150 extracted out as a separate project. Elogind integrates with PAM to provide
151 the org.freedesktop.login1 interface over the system bus, allowing other parts
152 of a the system to know what users are logged in, and where.")
153 (license license:lgpl2.1+))))
154
155 (define-public python-pyxdg
156 (package
157 (name "python-pyxdg")
158 (version "0.25")
159 (source
160 (origin
161 (method url-fetch)
162 (uri (string-append
163 "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
164 version ".tar.gz"))
165 (sha256
166 (base32
167 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
168 (build-system python-build-system)
169 (arguments
170 '(#:phases
171 (alist-replace
172 'check
173 (lambda* (#:key inputs #:allow-other-keys)
174 (setenv "XDG_DATA_DIRS"
175 (string-append (assoc-ref inputs "shared-mime-info")
176 "/share/"))
177 (substitute* "test/test-icon.py"
178 (("/usr/share/icons/hicolor/index.theme")
179 (string-append (assoc-ref inputs "hicolor-icon-theme")
180 "/share/icons/hicolor/index.theme")))
181
182 ;; One test fails with:
183 ;; AssertionError: 'x-apple-ios-png' != 'png'
184 (substitute* "test/test-mime.py"
185 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
186 (zero? (system* "nosetests" "-v")))
187 %standard-phases)))
188 (native-inputs
189 `(("shared-mime-info" ,shared-mime-info) ;for tests
190 ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
191 ("python-nose" ,python-nose)
192 ("python-setuptools" ,python-setuptools)))
193 (home-page "http://freedesktop.org/wiki/Software/pyxdg")
194 (synopsis "Implementations of freedesktop.org standards in Python")
195 (description
196 "PyXDG is a collection of implementations of freedesktop.org standards in
197 Python")
198 (license license:lgpl2.0)))
199
200 (define-public python2-pyxdg
201 (package-with-python2 python-pyxdg))
202
203 (define-public wayland
204 (package
205 (name "wayland")
206 (version "1.8.1")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "http://wayland.freedesktop.org/releases/"
210 name "-" version ".tar.xz"))
211 (sha256
212 (base32
213 "1j3gfzn8i0xhk3j34mwb2srrscjxfyi279jhyq80mz943j6r6z7i"))))
214 (build-system gnu-build-system)
215 (native-inputs
216 `(("doxygen" ,doxygen)
217 ("pkg-config" ,pkg-config)
218 ("xmlto" ,xmlto)
219 ("xsltproc" ,libxslt)))
220 (inputs
221 `(("docbook-xml" ,docbook-xml)
222 ("docbook-xsl" ,docbook-xsl)
223 ("expat" ,expat)
224 ("libffi" ,libffi)
225 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
226 (home-page "http://wayland.freedesktop.org/")
227 (synopsis "Display server protocol")
228 (description
229 "Wayland is a protocol for a compositor to talk to its clients as well as
230 a C library implementation of that protocol. The compositor can be a standalone
231 display server running on Linux kernel modesetting and evdev input devices, an X
232 application, or a wayland client itself. The clients can be traditional
233 applications, X servers (rootless or fullscreen) or other display servers.")
234 (license license:x11)))