summary refs log tree commit diff
path: root/gnu/packages/freedesktop.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/freedesktop.scm')
-rw-r--r--gnu/packages/freedesktop.scm298
1 files changed, 180 insertions, 118 deletions
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 514125977b..4e1fa2e863 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -23,7 +23,9 @@
 ;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +47,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -98,6 +101,7 @@
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages rdesktop)
+  #:use-module (gnu packages rsync)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
@@ -578,33 +582,41 @@ the freedesktop.org XDG Base Directory specification.")
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
-       (let* ((out (assoc-ref %outputs "out"))
-              (sysconf (string-append out "/etc"))
-              (libexec (string-append out "/libexec/elogind"))
-              (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
-              (shadow (assoc-ref %build-inputs "shadow"))
-              (shepherd (assoc-ref %build-inputs "shepherd"))
-              (halt-path (string-append shepherd "/sbin/halt"))
-              (kexec-path "")           ;not available in Guix yet
-              (nologin-path (string-append shadow "/sbin/nologin"))
-              (poweroff-path (string-append shepherd "/sbin/shutdown"))
-              (reboot-path (string-append shepherd "/sbin/reboot")))
-         (list
-          (string-append "-Drootprefix=" out)
-          (string-append "-Dsysconfdir=" sysconf)
-          (string-append "-Drootlibexecdir=" libexec)
-          (string-append "-Ddbuspolicydir=" dbuspolicy)
-          (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
-          (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
-          (string-append "-Dhalt-path=" halt-path)
-          (string-append "-Dkexec-path=" kexec-path)
-          (string-append "-Dpoweroff-path=" poweroff-path)
-          (string-append "-Dreboot-path=" reboot-path)
-          (string-append "-Dnologin-path=" nologin-path)
-          "-Dcgroup-controller=elogind"
-          "-Dman=true"
-          ;; Disable some tests.
-          "-Dslow-tests=false"))
+       ;; TODO(core-updates): Use #$output unconditionally.
+       ,#~(let* ((out #$(if (%current-target-system)
+                            #~#$output
+                            #~(assoc-ref %outputs "out")))
+                 (sysconf (string-append out "/etc"))
+                 (libexec (string-append out "/libexec/elogind"))
+                 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
+                 ;; TODO(core-updates): use this-package-input unconditionally.
+                 (shadow #$(if (%current-target-system)
+                               (this-package-input "shadow")
+                               #~(assoc-ref %build-inputs "shadow")))
+                 (shepherd #$(if (%current-target-system)
+                                 (this-package-input "shepherd")
+                                 #~(assoc-ref %build-inputs "shepherd")))
+                 (halt-path (string-append shepherd "/sbin/halt"))
+                 (kexec-path "")           ;not available in Guix yet
+                 (nologin-path (string-append shadow "/sbin/nologin"))
+                 (poweroff-path (string-append shepherd "/sbin/shutdown"))
+                 (reboot-path (string-append shepherd "/sbin/reboot")))
+            (list
+             (string-append "-Drootprefix=" out)
+             (string-append "-Dsysconfdir=" sysconf)
+             (string-append "-Drootlibexecdir=" libexec)
+             (string-append "-Ddbuspolicydir=" dbuspolicy)
+             (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
+             (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
+             (string-append "-Dhalt-path=" halt-path)
+             (string-append "-Dkexec-path=" kexec-path)
+             (string-append "-Dpoweroff-path=" poweroff-path)
+             (string-append "-Dreboot-path=" reboot-path)
+             (string-append "-Dnologin-path=" nologin-path)
+             "-Dcgroup-controller=elogind"
+             "-Dman=true"
+             ;; Disable some tests.
+             "-Dslow-tests=false"))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-pkttyagent-path
@@ -650,7 +662,7 @@ the freedesktop.org XDG Base Directory specification.")
              ;; logind system so that it can flicker the monitor, etc.
              ;; Just skip it until a more narrow selection can be made.
              (substitute* "src/libelogind/sd-login/test-login.c"
-               (("r = sd_pid_get_slice.*")
+               (("test_login\\(\\);")
                 "return 77;"))
              #t))
          (add-after 'unpack 'change-pid-file-path
@@ -818,7 +830,8 @@ of a the system to know what users are logged in, and where.")
                                       (install-file map data))
                                     (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
                           #t)))))))
-    (native-inputs (package-native-inputs elogind))
+    (native-inputs `(,@(package-native-inputs elogind)
+                     ("rsync" ,rsync)))
     (inputs `(("libmount" ,util-linux "lib")
               ("xkeyboard-config" ,xkeyboard-config)
               ("kbd" ,kbd)
@@ -954,43 +967,80 @@ Python.")
 (define-public wayland
   (package
     (name "wayland")
-    (version "1.18.0")
+    (version "1.19.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://wayland.freedesktop.org/releases/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
-    (build-system gnu-build-system)
+                "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
+    (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
-     `(#:parallel-tests? #f))
+     `(#:parallel-tests? #f
+        #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook-xml
+           ;; TODO(core-updates): Use 'native-inputs' unconditionally
+           (lambda* (#:key ,@(if (%current-target-system)
+                                 '(native-inputs)
+                                 '())
+                     inputs #:allow-other-keys)
+             (with-directory-excursion "doc"
+               (substitute* (find-files "." "\\.xml$")
+                 (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xml")
+                                 "/xml/dtd/docbook/"))
+                 (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xml-4.2")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))
+               #t))))))
     (native-inputs
-     `(("doxygen" ,doxygen)
-       ("graphviz" ,graphviz)
+     `(("docbook-xml-4.2" ,docbook-xml-4.2)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
        ("pkg-config" ,pkg-config)
        ("xmlto" ,xmlto)
-       ("xsltproc" ,libxslt)))
+       ("xsltproc" ,libxslt)
+       ,@(if (%current-target-system)
+             `(("pkg-config-for-build" ,pkg-config-for-build)
+               ("wayland" ,this-package)) ; for wayland-scanner
+             '())))
     (inputs
-     `(("docbook-xml" ,docbook-xml)
-       ("docbook-xsl" ,docbook-xsl)
-       ("expat" ,expat)
-       ("libffi" ,libffi)
-       ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
+     `(("expat" ,expat)
+       ("libxml2" ,libxml2)))           ; for XML_CATALOG_FILES
+    (propagated-inputs
+     `(("libffi" ,libffi)))
     (home-page "https://wayland.freedesktop.org/")
-    (synopsis "Display server protocol")
-    (description
-     "Wayland is a protocol for a compositor to talk to its clients as well as
-a C library implementation of that protocol.  The compositor can be a standalone
-display server running on Linux kernel modesetting and evdev input devices, an X
-application, or a wayland client itself.  The clients can be traditional
-applications, X servers (rootless or fullscreen) or other display servers.")
-    (license license:x11)))
+    (synopsis "Core Wayland window system code and protocol")
+    (description "Wayland is a project to define a protocol for a compositor to
+talk to its clients as well as a library implementation of the protocol.  The
+compositor can be a standalone display server running on Linux kernel
+modesetting and evdev input devices, an X application, or a wayland client
+itself.  The clients can be traditional applications, X servers (rootless or
+fullscreen) or other display servers.")
+    (license license:expat)))
 
 (define-public wayland-protocols
   (package
     (name "wayland-protocols")
-    (version "1.20")
+    (version "1.23")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -998,14 +1048,17 @@ applications, X servers (rootless or fullscreen) or other display servers.")
                     "wayland-protocols-" version ".tar.xz"))
               (sha256
                (base32
-                "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
-    (build-system gnu-build-system)
+                "0xizccackgwszjhlq7jjiv2z2gwppljx0w32ga91bxlnby8z22kc"))))
+    (build-system meson-build-system)
     (inputs
      `(("wayland" ,wayland)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (synopsis "Wayland protocols")
-    (description "This package contains XML definitions of the Wayland protocols.")
+    (description "Wayland-Protocols contains Wayland protocols that add
+functionality not available in the Wayland core protocol.  Such protocols either
+add completely new functionality, or extend the functionality of some other
+protocol either in Wayland core, or some other protocol in wayland-protocols.")
     (home-page "https://wayland.freedesktop.org")
     (license license:expat)))
 
@@ -1126,8 +1179,7 @@ applications, X servers (rootless or fullscreen) or other display servers.")
          (add-before 'check 'start-xorg-server
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The test suite requires a running X server.
-             (system (string-append (assoc-ref inputs "xorg-server")
-                                    "/bin/Xvfb :1 &"))
+             (system "Xvfb :1 &")
              (setenv "DISPLAY" ":1")
              #t)))))
     (home-page "https://wayland.freedesktop.org")
@@ -1340,57 +1392,62 @@ message bus.")
 (define-public accountsservice
   (package
     (name "accountsservice")
-    (version "0.6.50")
+    (version "0.6.55")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.freedesktop.org/software/"
-                           "accountsservice/accountsservice-" version ".tar.xz"))
+                           "accountsservice/accountsservice-"
+                           version ".tar.xz"))
        (sha256
-        (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
-    (build-system gnu-build-system)
+        (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz"))))
+    (build-system meson-build-system)
     (arguments
      '(#:tests? #f ; XXX: tests require DocBook 4.1.2
        #:configure-flags
        '("--localstatedir=/var"
-         "--disable-systemd"
-         "--enable-elogind")
+         "-Dsystemdsystemunitdir=/tmp/empty"
+         "-Dsystemd=false"
+         "-Delogind=true")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-/bin/cat
            (lambda _
              (substitute* "src/user.c"
-               (("/bin/cat") (which "cat")))
-             #t))
+               (("/bin/cat") (which "cat")))))
          (add-before
           'configure 'pre-configure
           (lambda* (#:key inputs #:allow-other-keys)
-            ;; Don't try to create /var/lib/AccountsService.
-            (substitute* "src/Makefile.in"
-              (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
+            (substitute* "meson_post_install.py"
+              (("in dst_dirs") "in []"))
             (let ((shadow (assoc-ref inputs "shadow")))
               (substitute* '("src/user.c" "src/daemon.c")
-                (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
-                (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
-                (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
-                (("/usr/bin/passwd")   (string-append shadow "/bin/passwd"))
-                (("/usr/bin/chage")    (string-append shadow "/bin/chage"))))
-            #t)))))
+                (("/usr/sbin/usermod")
+                 (string-append shadow "/sbin/usermod"))
+                (("/usr/sbin/useradd")
+                 (string-append shadow "/sbin/useradd"))
+                (("/usr/sbin/userdel")
+                 (string-append shadow "/sbin/userdel"))
+                (("/usr/bin/passwd")
+                 (string-append shadow "/bin/passwd"))
+                (("/usr/bin/chage")
+                 (string-append shadow "/bin/chage")))))))))
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("elogind" ,elogind)
+     `(("dbus" ,dbus)
+       ("elogind" ,elogind)
        ("polkit" ,polkit)
        ("shadow" ,shadow)))
     (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
     (synopsis "D-Bus interface for user account query and manipulation")
     (description
-     "The AccountService project provides a set of D-Bus interfaces for querying
-and manipulating user account information and an implementation of these
-interfaces, based on the useradd, usermod and userdel commands.")
+     "The AccountService project provides a set of D-Bus interfaces for
+querying and manipulating user account information and an implementation of
+these interfaces, based on the useradd, usermod and userdel commands.")
     (license license:gpl3+)))
 
 (define-public libmbim
@@ -2182,6 +2239,13 @@ useful with system integration.")
              "https://launchpad.net/libappindicator/"
              (version-major+minor version) "/" version
              "/+download/libappindicator-" version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Fix 'multiple definitions' error from GCC 10
+           (substitute* "bindings/python/appindicatormodule.c"
+             (("^#include <pygobject.h>" all)
+              (string-append "#define NO_IMPORT_PYGOBJECT\n" all)))))
        (sha256
         (base32
          "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
@@ -2242,48 +2306,46 @@ fallback to generic Systray support if none of those are available.")
     (license license:lgpl2.1+)))
 
 (define-public libportal
-  (let ((commit "bff3289")
-        (revision "1"))
-    (package
-      (name "libportal")
-      (version (git-version "0.3" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/flatpak/libportal")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
-      (build-system meson-build-system)
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-after 'install 'move-doc
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out"))
-                     (doc (assoc-ref outputs "doc"))
-                     (html "/share/gtk-doc"))
-                 (copy-recursively (string-append out html)
-                                   (string-append doc html))
-                 (delete-file-recursively (string-append out html))
-                 #t))))))
-      (native-inputs
-       `(("pkg-config" ,pkg-config)
-         ("gtk-doc" ,gtk-doc/stable)
-         ("docbook-xsl" ,docbook-xsl)
-         ("docbook-xml" ,docbook-xml)
-         ("libxml2" ,libxml2)
-         ("glib:bin" ,glib "bin")))
-      (propagated-inputs
-       `(("glib" ,glib)))
-      (outputs '("out" "doc"))
-      (home-page "https://github.com/flatpak/libportal")
-      (synopsis "Flatpak portal library")
-      (description
-       "libportal provides GIO-style async APIs for most Flatpak portals.")
-      (license license:lgpl2.1+))))
+  (package
+    (name "libportal")
+    (version "0.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/flatpak/libportal")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1jh6wd96y4i218zbmmqw12zir8p88nm8dlsa3yx3lsqxd5c1krky"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc"))
+                   (html "/share/gtk-doc"))
+               (copy-recursively (string-append out html)
+                                 (string-append doc html))
+               (delete-file-recursively (string-append out html))
+               #t))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gtk-doc" ,gtk-doc/stable)
+       ("docbook-xsl" ,docbook-xsl)
+       ("docbook-xml" ,docbook-xml)
+       ("libxml2" ,libxml2)
+       ("glib:bin" ,glib "bin")))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (outputs '("out" "doc"))
+    (home-page "https://github.com/flatpak/libportal")
+    (synopsis "Flatpak portal library")
+    (description
+     "libportal provides GIO-style async APIs for most Flatpak portals.")
+    (license license:lgpl2.1+)))
 
 (define-public xdg-desktop-portal
   (package