guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: services: Add activate script to the profile system director


From: guix-commits
Subject: 01/02: gnu: services: Add activate script to the profile system directory.
Date: Tue, 9 Mar 2021 00:57:02 -0500 (EST)

bricewge pushed a commit to branch master
in repository guix.

commit df138dc20858725b90ed77be85f3318cbe1be73a
Author: Brice Waegeneire <brice@waegenei.re>
AuthorDate: Sat Jan 30 21:08:08 2021 +0100

    gnu: services: Add activate script to the profile system directory.
    
    * gnu/services.scm (activation-profile-entry): New procedure...
    (activation-service-type): ... use it.
---
 gnu/services.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 13259df..ddd1bac 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -617,13 +617,21 @@ ACTIVATION-SCRIPT-TYPE."
   "Return a gexp that runs the activation script containing GEXPS."
   #~(primitive-load #$(activation-script gexps)))
 
+(define (activation-profile-entry gexps)
+  "Return, as a monadic value, an entry for the activation script in the
+system directory."
+  (mlet %store-monad ((activate (lower-object (activation-script gexps))))
+    (return `(("activate" ,activate)))))
+
 (define (second-argument a b) b)
 
 (define activation-service-type
   (service-type (name 'activate)
                 (extensions
                  (list (service-extension boot-service-type
-                                          gexps->activation-gexp)))
+                                          gexps->activation-gexp)
+                       (service-extension system-service-type
+                                          activation-profile-entry)))
                 (compose identity)
                 (extend second-argument)
                 (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]