diff mbox series

[bug#52502] home: Add gexp-compiler for home-environments.

Message ID 87czly9vod.fsf@trop.in
State Accepted
Headers show
Series [bug#52502] home: Add gexp-compiler for home-environments. | expand

Commit Message

Andrew Tropin Dec. 15, 2021, 7:25 a.m. UTC
* gnu/home.scm (home-environment-compiler): New variable.
---
 gnu/home.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Ludovic Courtès Dec. 19, 2021, 10:20 p.m. UTC | #1
Hi,

Andrew Tropin <andrew@trop.in> skribis:

> * gnu/home.scm (home-environment-compiler): New variable.

Applied, thanks!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/home.scm b/gnu/home.scm
index d8134693e5..a9f0a469a5 100644
--- a/gnu/home.scm
+++ b/gnu/home.scm
@@ -25,6 +25,8 @@  (define-module (gnu home)
   #:use-module (gnu services)
   #:use-module (guix records)
   #:use-module (guix diagnostics)
+  #:use-module (guix gexp)
+  #:use-module (guix store)
 
   #:export (home-environment
             home-environment?
@@ -104,3 +106,11 @@  (define* (home-environment-with-provenance he config-file)
     (inherit he)
     (services (cons (service home-provenance-service-type config-file)
                     (home-environment-user-services he)))))
+
+(define-gexp-compiler (home-environment-compiler (he <home-environment>)
+                                                 system target)
+  ((store-lift
+    (lambda (store)
+      (run-with-store store (home-environment-derivation he)
+                      #:system system
+                      #:target target)))))