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, 2016 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
8 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages freedesktop)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (gnu packages gnome)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages gperf)
39 #:use-module (gnu packages graphviz)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages xml)
42 #:use-module (gnu packages docbook)
43 #:use-module (gnu packages glib) ;intltool
44 #:use-module (gnu packages xdisorg)
45 #:use-module (gnu packages xorg)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages m4)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages libffi)
51 #:use-module (gnu packages acl)
52 #:use-module (gnu packages admin)
53 #:use-module (gnu packages polkit)
54 #:use-module (gnu packages databases))
56 (define-public xdg-utils
64 "https://portland.freedesktop.org/download/xdg-utils-"
68 "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1"))))
69 (build-system gnu-build-system)
71 `(("xprop" ,xprop) ; for Xfce detecting
72 ("xset" ,xset))) ; for xdg-screensaver
74 `(#:tests? #f)) ; no check target
75 (home-page "http://portland.freedesktop.org/")
76 (synopsis "Freedesktop.org scripts for desktop integration")
77 (description "The xdg-utils package is a set of simple scripts that
78 provide basic desktop integration functions in the framework of the
79 freedesktop.org project.")
80 (license license:expat)))
82 (define-public libinput
88 (uri (string-append "https://freedesktop.org/software/libinput/"
89 name "-" version ".tar.xz"))
92 "085lcxy111j8r1lwyghsc6zrysqh0vg8xip5axxsdl8r8n3i1vvn"))))
93 (build-system gnu-build-system)
95 `(("pkg-config" ,pkg-config)))
97 `(("libudev" ,eudev))) ; required by libinput.pc
99 `(("libevdev" ,libevdev)
101 ("libwacom" ,libwacom)))
102 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
103 (synopsis "Input devices handling library")
105 "Libinput is a library to handle input devices for display servers and
106 other applications that need to directly deal with input devices.")
107 (license license:x11)))
109 (define-public libxdg-basedir
111 (name "libxdg-basedir")
116 "https://github.com/devnev/libxdg-basedir/archive/"
117 name "-" version ".tar.gz"))
120 "0s28c7sfwqimsmb3kn91mx7wi55fs3flhbmynl9k60rrllr00aqw"))))
121 (build-system gnu-build-system)
124 (modify-phases %standard-phases
125 (add-after 'unpack 'autogen
127 ;; Run 'configure' in its own phase, not now.
128 (substitute* "autogen.sh"
129 (("^.*\\./configure.*") ""))
130 (zero? (system* "sh" "autogen.sh")))))))
132 `(("autoconf" ,autoconf)
133 ("automake" ,automake)
134 ("libtool" ,libtool)))
135 (home-page "https://github.com/devnev/libxdg-basedir")
136 (synopsis "Implementation of the XDG Base Directory specification")
138 "libxdg-basedir is a C library providing some functions to use with
139 the freedesktop.org XDG Base Directory specification.")
140 (license license:expat)))
142 (define-public elogind
148 (uri (string-append "https://wingolog.org/pub/" name "/"
149 name "-" version ".tar.xz"))
152 "1jckc4wx199n1q4r4fv43ibjs6nlq91s39w9r78ilk1z383m1hcx"))
153 (modules '((guix build utils)))
156 (use-modules (guix build utils))
157 (substitute* "Makefile.am"
158 ;; Avoid validation against DTD because the DTDs for
159 ;; both doctype 4.2 and 4.5 are needed.
160 (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))))))
161 (build-system gnu-build-system)
164 (list (string-append "--with-libcap="
165 (assoc-ref %build-inputs "libcap"))
166 (string-append "--with-udevrulesdir="
167 (assoc-ref %outputs "out")
168 "/lib/udev/rules.d"))
169 #:make-flags '("PKTTYAGENT=/run/current-system/profile/bin/pkttyagent")
170 #:phases (modify-phases %standard-phases
171 (add-before 'build 'fix-service-file
172 (lambda* (#:key outputs #:allow-other-keys)
173 ;; Fix the file name of the 'elogind' binary in the D-Bus
175 (substitute* "src/login/org.freedesktop.login1.service"
177 (string-append "Exec=" (assoc-ref %outputs "out")
178 "/libexec/elogind/elogind\n"))))))))
180 `(("intltool" ,intltool)
181 ("gettext" ,gnu-gettext)
182 ("docbook-xsl" ,docbook-xsl)
183 ("docbook-xml" ,docbook-xml)
184 ("xsltproc" ,libxslt)
186 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
187 ("pkg-config" ,pkg-config)
190 `(("linux-pam" ,linux-pam)
191 ("linux-libre-headers" ,linux-libre-headers)
193 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
194 ;when pressing the power button
197 (home-page "https://github.com/wingo/elogind")
198 (synopsis "User, seat, and session management service")
199 (description "Elogind is the systemd project's \"logind\" service,
200 extracted out as a separate project. Elogind integrates with PAM to provide
201 the org.freedesktop.login1 interface over the system bus, allowing other parts
202 of a the system to know what users are logged in, and where.")
203 (license license:lgpl2.1+)))
205 (define-public python-pyxdg
207 (name "python-pyxdg")
213 "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
217 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
218 (build-system python-build-system)
223 (lambda* (#:key inputs #:allow-other-keys)
224 (setenv "XDG_DATA_DIRS"
225 (string-append (assoc-ref inputs "shared-mime-info")
227 (substitute* "test/test-icon.py"
228 (("/usr/share/icons/hicolor/index.theme")
229 (string-append (assoc-ref inputs "hicolor-icon-theme")
230 "/share/icons/hicolor/index.theme")))
232 ;; One test fails with:
233 ;; AssertionError: 'x-apple-ios-png' != 'png'
234 (substitute* "test/test-mime.py"
235 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
236 (zero? (system* "nosetests" "-v")))
239 `(("shared-mime-info" ,shared-mime-info) ;for tests
240 ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
241 ("python-nose" ,python-nose)
242 ("python-setuptools" ,python-setuptools)))
243 (home-page "http://freedesktop.org/wiki/Software/pyxdg")
244 (synopsis "Implementations of freedesktop.org standards in Python")
246 "PyXDG is a collection of implementations of freedesktop.org standards in
248 (license license:lgpl2.0)))
250 (define-public python2-pyxdg
251 (package-with-python2 python-pyxdg))
253 (define-public wayland
259 (uri (string-append "https://wayland.freedesktop.org/releases/"
260 name "-" version ".tar.xz"))
263 "1c0d5ivy9n44hykvw2ggrvqrnn7naw3wg11vbvgwzgi8g5gr4h4m"))))
264 (build-system gnu-build-system)
265 (arguments `(#:parallel-tests? #f))
267 `(("doxygen" ,doxygen)
268 ("graphviz" ,graphviz)
269 ("pkg-config" ,pkg-config)
271 ("xsltproc" ,libxslt)))
273 `(("docbook-xml" ,docbook-xml)
274 ("docbook-xsl" ,docbook-xsl)
277 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
278 (home-page "https://wayland.freedesktop.org/")
279 (synopsis "Display server protocol")
281 "Wayland is a protocol for a compositor to talk to its clients as well as
282 a C library implementation of that protocol. The compositor can be a standalone
283 display server running on Linux kernel modesetting and evdev input devices, an X
284 application, or a wayland client itself. The clients can be traditional
285 applications, X servers (rootless or fullscreen) or other display servers.")
286 (license license:x11)))
288 (define-public exempi
295 "https://libopenraw.freedesktop.org/download/"
296 name "-" version ".tar.bz2"))
299 "0jcrv3w8m415cq8xi886hcxfqbrn5dczxbzybx9bhf3dbqsyv6nq"))))
300 (build-system gnu-build-system)
302 `(#:configure-flags (list (string-append "--with-boost="
303 (assoc-ref %build-inputs "boost")))))
305 `(("boost" ,boost))) ; tests
309 (home-page "https://wiki.freedesktop.org/libopenraw/Exempi")
310 (synopsis "XMP metadata handling library")
311 (description "Exempi is an implementation of the Extensible Metadata
312 Platform (XMP), which enables embedding metadata in PDF and image formats.")
313 (license license:bsd-3)))
315 (define-public libatasmart
321 (uri (string-append "http://0pointer.de/public/"
322 name "-" version ".tar.xz"))
325 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
326 (build-system gnu-build-system)
328 `(("pkg-config" ,pkg-config)))
331 (home-page "http://0pointer.de/blog/projects/being-smart.html")
332 (synopsis "ATA S.M.A.R.T. reading and parsing library")
334 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
335 Analysis and Reporting Technology) functionality.")
336 (license license:lgpl2.1+)))
338 (define-public udisks
344 (uri (string-append "https://udisks.freedesktop.org/releases/"
345 name "-" version ".tar.bz2"))
348 "119pr2zbff8vkwlhghim7d7ir24c1dil9hp4q49wm4f6pnrjpbmb"))))
349 (build-system gnu-build-system)
351 `(("glib:bin" ,glib "bin") ; for glib-mkenums
352 ("gobject-introspection" ,gobject-introspection)
353 ("intltool" ,intltool)
354 ("pkg-config" ,pkg-config)
355 ("xsltproc" ,libxslt)))
357 `(("glib" ,glib))) ; required by udisks2.pc
360 ("libatasmart" ,libatasmart)
361 ("libgudev" ,libgudev)
363 ("util-linux" ,util-linux)))
365 "doc")) ;5 MiB of gtk-doc HTML
367 `(#:tests? #f ; requiring system message dbus
368 #:disallowed-references ("doc") ;enforce separation of "doc"
370 (list "--disable-man"
371 "--localstatedir=/var"
372 "--enable-fhs-media" ;mount devices in /media, not /run/media
373 (string-append "--with-html-dir="
374 (assoc-ref %outputs "doc")
375 "/share/doc/udisks/html")
376 (string-append "--with-udevdir=" %output "/lib/udev"))
378 (modify-phases %standard-phases
380 'configure 'fix-girdir
382 ;; Install introspection data to its own output.
383 (substitute* "udisks/Makefile.in"
385 "girdir = $(datadir)/gir-1.0\n")
386 (("typelibsdir = .*")
387 "typelibsdir = $(libdir)/girepository-1.0\n"))))
388 (add-after 'install 'set-mount-file-name
389 (lambda* (#:key outputs inputs #:allow-other-keys)
390 ;; Tell 'udisksd' where to find the 'mount' command.
391 (let ((out (assoc-ref outputs "out"))
392 (utils (assoc-ref inputs "util-linux")))
393 (wrap-program (string-append out "/libexec/udisks2/udisksd")
395 (,(string-append utils "/bin") ;for 'mount'
396 "/run/current-system/profile/bin"
397 "/run/current-system/profile/sbin")))
399 (home-page "http://www.freedesktop.org/wiki/Software/udisks/")
400 (synopsis "Disk manager service")
402 "UDisks provides interfaces to enumerate and perform operations on disks
403 and storage devices. Any application (including unprivileged ones) can access
404 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
406 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
407 (license (list license:gpl2+ license:lgpl2.0+))))
409 (define-public accountsservice
411 (name "accountsservice")
415 (uri (string-append "https://www.freedesktop.org/software/"
416 name "/" name "-" version ".tar.xz"))
419 "0ayb3y3l25dmwxlh9g071h02mphjfbkvi2k5f635bayb01k7akzh"))))
420 (build-system gnu-build-system)
422 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
424 '("--localstatedir=/var")
426 (modify-phases %standard-phases
428 'configure 'pre-configure
430 ;; Don't try to create /var/lib/AccoutsService.
431 (substitute* "src/Makefile.in"
432 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true")))))))
434 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
435 ("gobject-introspection" ,gobject-introspection)
436 ("intltool" ,intltool)
437 ("pkg-config" ,pkg-config)))
439 `(("polkit" ,polkit)))
440 (home-page "http://www.freedesktop.org/wiki/Software/AccountsService/")
441 (synopsis "D-Bus interface for user account query and manipulation")
443 "The AccountService project provides a set of D-Bus interfaces for querying
444 and manipulating user account information and an implementation of these
445 interfaces, based on the useradd, usermod and userdel commands.")
446 (license license:gpl3+)))
448 (define-public libmbim
455 "https://www.freedesktop.org/software/" name "/"
456 name "-" version ".tar.xz"))
459 "0flpgzsqpjgybjkx4smbb4rjxf2w1xgd1v9gmz61rvl89qasznbv"))))
460 (build-system gnu-build-system)
462 `(("glib:bin" ,glib "bin") ; for glib-mkenums
463 ("pkg-config" ,pkg-config)
464 ("python" ,python-wrapper)))
466 `(("glib" ,glib))) ; required by mbim-glib.pc
468 `(("libgudev" ,libgudev)))
469 (synopsis "Library to communicate with MBIM-powered modems")
470 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
472 "Libmbim is a GLib-based library for talking to WWAN modems and devices
473 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
475 ;; The libmbim-glib library is released under the LGPLv2+ license.
476 ;; The mbimcli tool is released under the GPLv2+ license.
477 (list license:lgpl2.0+ license:gpl2+))))
479 (define-public libqmi
486 "https://www.freedesktop.org/software/" name "/"
487 name "-" version ".tar.xz"))
490 "0h009bzss4bal47nk21lyp4s3mmlcivhhaaj7r9229qvx85bi0v2"))))
491 (build-system gnu-build-system)
493 `(("glib:bin" ,glib "bin") ; for glib-mkenums
494 ("pkg-config" ,pkg-config)
495 ("python" ,python-wrapper)))
497 `(("glib" ,glib))) ; required by qmi-glib.pc
498 (synopsis "Library to communicate with QMI-powered modems")
499 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
501 "Libqmi is a GLib-based library for talking to WWAN modems and devices
502 which speak the Qualcomm MSM Interface (QMI) protocol.")
504 ;; The libqmi-glib library is released under the LGPLv2+ license.
505 ;; The qmicli tool is released under the GPLv2+ license.
506 (list license:lgpl2.0+ license:gpl2+))))
508 (define-public modem-manager
510 (name "modem-manager")
515 "https://www.freedesktop.org/software/ModemManager/"
516 "ModemManager-" version ".tar.xz"))
519 "18hvffwcncwz14kdzk42jbkh362n0kjv3kgx7axbqx572pawvrmb"))))
520 (build-system gnu-build-system)
523 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
525 `(("glib:bin" ,glib "bin") ; for glib-mkenums
526 ("gobject-introspection" ,gobject-introspection)
527 ("intltool" ,intltool)
528 ("pkg-config" ,pkg-config)
533 `(("glib" ,glib))) ; required by mm-glib.pc
535 `(("libgudev" ,libgudev)
539 (synopsis "Mobile broadband modems manager")
540 (home-page "http://www.freedesktop.org/wiki/Software/ModemManager/")
542 "ModemManager is a DBus-activated daemon which controls mobile
543 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
544 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
545 external power supplies, ModemManager is able to prepare and configure the
546 modems and setup connections with them.")
547 (license license:gpl2+)))
549 (define-public telepathy-logger
551 (name "telepathy-logger")
555 (uri (string-append "https://telepathy.freedesktop.org/releases/"
556 name "/" name "-" version ".tar.bz2"))
559 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
560 (build-system gnu-build-system)
562 '(#:parallel-tests? #f
564 (modify-phases %standard-phases
565 (add-before 'check 'pre-check
567 (setenv "HOME" (getenv "TMPDIR"))
570 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
571 ("gobject-introspection" ,gobject-introspection)
572 ("intltool" ,intltool)
573 ("pkg-config" ,pkg-config)
575 ("xsltproc" ,libxslt)))
577 ;; telepathy-logger-0.2.pc refers to all these.
578 `(("libxml2" ,libxml2)
580 ("telepathy-glib" ,telepathy-glib)))
581 (synopsis "Telepathy logger library")
582 (home-page "http://telepathy.freedesktop.org/")
584 "Telepathy logger is a headless observer client that logs information
585 received by the Telepathy framework. It features pluggable backends to log
586 different sorts of messages in different formats.")
587 (license license:lgpl2.1+)))
589 (define-public colord-gtk
595 (uri (string-append "https://www.freedesktop.org/software/colord"
596 "/releases/" name "-" version ".tar.xz"))
599 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
600 (build-system gnu-build-system)
601 (arguments '(#:tests? #f)) ; require the colord system service
603 `(("gobject-introspection" ,gobject-introspection)
604 ("intltool" ,intltool)
605 ("pkg-config" ,pkg-config)
608 ;; colord-gtk.pc refers to all these.
611 (synopsis "GTK integration for libcolord")
612 (home-page "http://www.freedesktop.org/software/colord/")
614 "This is a GTK+ convenience library for interacting with colord. It is
615 useful for both applications which need colour management and applications that
616 wish to perform colour calibration.")
617 (license license:lgpl2.1+)))