GNU bug report logs - #46560
[PATCH 0/2] Activate system when switching generations.

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Tue, 16 Feb 2021 13:01:01 UTC

Severity: normal

Tags: patch

Done: Brice Waegeneire <brice <at> waegenei.re>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 46560 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 46560 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: services: Add activate script to the profile system
 directory.
Date: Tue, 16 Feb 2021 14:22:34 +0100
* 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 13259dfaee..ddd1bac30c 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
-- 
2.30.1





This bug report was last modified 4 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.