gnu: elogind: Support global shutdown & suspend hooks.

* gnu/packages/freedesktop.scm (elogind)[arguments]: Add a new
'use-global-hook-directory phase.
This commit is contained in:
Tobias Geerinckx-Rice 2022-11-20 01:00:00 +01:00
parent 26a200f71c
commit f27d4c9a78
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79

View File

@ -650,6 +650,13 @@ the freedesktop.org XDG Base Directory specification.")
(substitute* "meson.build"
(("join_paths\\(bindir, 'pkttyagent'\\)")
"'\"/run/current-system/profile/bin/pkttyagent\"'"))))
(add-after 'unpack 'use-global-hook-directory
;; XXX There is no run-time setting to set this per-process, only a
;; build-time, hard-coded list of global directories.
(lambda _
(substitute* (list "src/login/elogind-dbus.c"
"src/sleep/sleep.c")
(("PKGSYSCONFDIR") "\"/etc/elogind\""))))
(add-after 'unpack 'adjust-tests
(lambda _
;; Skip the following test, which depends on users such as 'root'