summaryrefslogtreecommitdiff
path: root/guix/web
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-06-15 21:40:02 -0400
committerDavid Thompson <davet@gnu.org>2015-06-15 21:40:02 -0400
commit18e0136136da0c9ef65dee83b9770e42ea42af75 (patch)
treea77a6d8b90bcff238c396c746dd37ef6d2a7ab81 /guix/web
parent092320d616462dd5b8a4fbdb3aa2e7de9d40bc1f (diff)
package: Adjust profile generation creation to current API.
* guix-web/package.scm (install-new-profile-generation): New procedure. (package-install): Use it. Call 'set-guile-for-build' before 'profile-derivation'. Written-By: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/web')
-rw-r--r--guix/web/package.scm25
1 files changed, 15 insertions, 10 deletions
diff --git a/guix/web/package.scm b/guix/web/package.scm
index 5fcfe51..e91a59c 100644
--- a/guix/web/package.scm
+++ b/guix/web/package.scm
@@ -50,21 +50,26 @@
(unless (string=? profile %profile)
(add-indirect-root store (canonicalize-path profile))))
+(define (install-new-profile-generation profile prof)
+ "Let PROF become the new generation of PROFILE."
+ (let* ((number (generation-number profile))
+ (name (generation-file-name profile (+ 1 number))))
+ (switch-symlinks name prof)
+ (switch-symlinks profile name)
+ ;; (maybe-register-gc-root (%store) profile)
+ ))
+
(define (package-install package)
(with-store %store
(let* ((new (manifest-add manifest
(list (package->manifest-entry package))))
(prof-drv (run-with-store %store
- (profile-derivation new)))
- (prof (derivation->output-path prof-drv)))
- (let* ((number (generation-number %profile))
- (name (generation-file-name %profile
- (+ 1 number))))
- (and (build-derivations %store (list prof-drv))
- (let* ((entries (manifest-entries new))
- (count (length entries)))
- (switch-symlinks name prof)
- (switch-symlinks %profile name)))))))
+ (mbegin %store-monad
+ (set-guile-for-build (default-guile))
+ (profile-derivation new))))
+ (prof (derivation->output-path prof-drv)))
+ (and (build-derivations %store (list prof-drv))
+ (install-new-profile-generation %profile prof)))))
(define (profile-generations*)
(map (lambda (n)