summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-27 14:58:15 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-28 23:24:18 +0200
commit1aa0033b646b59e62d6a05716a21c631fca55c77 (patch)
tree76f0d6c94fbf894d81412f2e541cc858674a7a82 /gnu/system.scm
parenteee212710978fb2044d3312aff0bf33b508aa026 (diff)
vm: Rewrite support procedures to use gexps.
* gnu/system/vm.scm (%imported-modules): Remove. (expression->derivation-in-linux-vm): Remove 'inputs' parameter. Rename 'imported-modules' to 'modules'. Rewrite using gexps and 'gexp->derivation'. (qemu-image): Add 'qemu' parameter. Pass NAME to 'expression->derivation-in-linux-vm'. Rewrite using gexps. Remove #:inputs argument to 'expression->derivation-in-linux-vm'. (operating-system-default-contents): Rewrite using gexps. * gnu/system.scm (operating-system-profile-derivation): Rename to... (operating-system-profile): ... this. Adjust callers. (operating-system-profile-directory): Remove.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm15
1 files changed, 5 insertions, 10 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 6308867794..65b524d387 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -52,8 +52,8 @@
operating-system-locale
operating-system-services
- operating-system-profile-directory
- operating-system-derivation))
+ operating-system-derivation
+ operating-system-profile))
;;; Commentary:
;;;
@@ -282,17 +282,12 @@ alias ll='ls -l'
("tzdata" ,tzdata))
#:name "etc")))
-(define (operating-system-profile-derivation os)
+(define (operating-system-profile os)
"Return a derivation that builds the default profile of OS."
;; TODO: Replace with a real profile with a manifest.
(union (operating-system-packages os)
#:name "default-profile"))
-(define (operating-system-profile-directory os)
- "Return the directory name of the default profile of OS."
- (mlet %store-monad ((drv (operating-system-profile-derivation os)))
- (return (derivation->output-path drv))))
-
(define (operating-system-accounts os)
"Return the user accounts for OS, including an obligatory 'root' account."
(mlet %store-monad ((services (sequence %store-monad
@@ -317,7 +312,7 @@ alias ll='ls -l'
(cons %pam-other-services
(append-map service-pam-services services))))
(accounts (operating-system-accounts os))
- (profile-drv (operating-system-profile-derivation os))
+ (profile-drv (operating-system-profile os))
(groups -> (append (operating-system-groups os)
(append-map service-user-groups services))))
(etc-directory #:accounts accounts #:groups groups
@@ -341,7 +336,7 @@ we're running in the final root."
(define (operating-system-derivation os)
"Return a derivation that builds OS."
(mlet* %store-monad
- ((profile-drv (operating-system-profile-derivation os))
+ ((profile-drv (operating-system-profile os))
(profile -> (derivation->output-path profile-drv))
(etc-drv (operating-system-etc-directory os))
(etc -> (derivation->output-path etc-drv))