[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: home: xdg: Add with-imported-modules to xdg activ
From: |
guix-commits |
Subject: |
branch master updated: home: xdg: Add with-imported-modules to xdg activation script. |
Date: |
Fri, 23 Dec 2022 02:45:00 -0500 |
This is an automated email from the git hooks/post-receive script.
abcdw pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new dd4eee5581 home: xdg: Add with-imported-modules to xdg activation
script.
dd4eee5581 is described below
commit dd4eee55819a4c4eb68a8e0db0bf6cecfeac3136
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Thu Dec 22 10:22:00 2022 +0400
home: xdg: Add with-imported-modules to xdg activation script.
Without it activation doesn't work when called in clean environment.
* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Add
with-imported-modules to xdg activation script.
---
gnu/home/services/xdg.scm | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm
index fb2dbb393e..3007493f85 100644
--- a/gnu/home/services/xdg.scm
+++ b/gnu/home/services/xdg.scm
@@ -120,22 +120,25 @@ services more consistent."))
home-xdg-base-directories-configuration-fields))
(define (ensure-xdg-base-dirs-on-activation config)
- #~(map (lambda (xdg-base-dir-variable)
- ((@ (guix build utils) mkdir-p)
- (getenv
- xdg-base-dir-variable)))
- '#$(filter-map
- (lambda (field)
- (let ((variable
- (string-append
- "XDG_"
- (object->snake-case-string
- (configuration-field-name field) 'upper))))
- ;; XDG_RUNTIME_DIR shouldn't be created during activation
- ;; and will be provided by elogind or other service.
- (and (not (string=? "XDG_RUNTIME_DIR" variable))
- variable)))
- home-xdg-base-directories-configuration-fields)))
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (map (lambda (xdg-base-dir-variable)
+ (mkdir-p
+ (getenv
+ xdg-base-dir-variable)))
+ '#$(filter-map
+ (lambda (field)
+ (let ((variable
+ (string-append
+ "XDG_"
+ (object->snake-case-string
+ (configuration-field-name field) 'upper))))
+ ;; XDG_RUNTIME_DIR shouldn't be created during activation
+ ;; and will be provided by elogind or other service.
+ (and (not (string=? "XDG_RUNTIME_DIR" variable))
+ variable)))
+ home-xdg-base-directories-configuration-fields)))))
(define (last-extension-or-cfg config extensions)
"Picks configuration value from last provided extension. If there
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: home: xdg: Add with-imported-modules to xdg activation script.,
guix-commits <=