summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-12 22:20:08 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-12 23:56:33 +0200
commit96da5d629672b27d4628c1f4dc8a273d4ade7852 (patch)
tree13aaea74f3fec4ac6690903210124186801dc0be /gnu
parent45bba47510a3768c59060373d2cc7beca3cd1b07 (diff)
downloadguix-96da5d629672b27d4628c1f4dc8a273d4ade7852.tar.gz
system: Add gexp compiler for <operating-system>.
* gnu/system.scm (operating-system-compiler): New procedure.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index bb7e8531ee..c4404f5932 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -967,4 +967,14 @@ being stored into the \"parameters\" file)."
                      (mount-point #$(boot-parameters-store-mount-point params))))
                  #:set-load-path? #f)))
 
+(define-gexp-compiler (operating-system-compiler (os <operating-system>)
+                                                 system target)
+  ((store-lift
+    (lambda (store)
+      ;; XXX: This is not super elegant but we can't pass SYSTEM and TARGET to
+      ;; 'operating-system-derivation'.
+      (run-with-store store (operating-system-derivation os)
+                      #:system system
+                      #:target target)))))
+
 ;;; system.scm ends here