From f27d4c9a78b64a5290cca905a5ad56d7b82ddbf4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 20 Nov 2022 01:00:00 +0100 Subject: gnu: elogind: Support global shutdown & suspend hooks. * gnu/packages/freedesktop.scm (elogind)[arguments]: Add a new 'use-global-hook-directory phase. --- gnu/packages/freedesktop.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 273e4209b2..3b44bb77c4 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -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' -- cgit v1.2.3