summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-07-26 22:54:40 +0200
committerLudovic Courtès <ludo@gnu.org>2014-07-26 22:57:00 +0200
commit462f5ccade9fd1372e2a7d1e854cd6324ebb4105 (patch)
tree6f804a79074238627c20e307d8569b5f450e0d9b /guix/scripts
parent4ca0b4101d2d15fc41c0a875f09553ded27091bd (diff)
profiles: Add 'package->manifest-entry'.
Suggested by Alex Kost <alezost@gmail.com>. * guix/scripts/package.scm (options->installable)[package->manifest-entry]: Move to (guix profiles). [package->manifest-entry*]: New procedure. Use it. * guix/profiles.scm (package->manifest-entry): New procedure. * tests/profiles.scm (guile-for-build): New variable. Call '%guile-for-build'. ("profile-derivation"): New test.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/package.scm23
1 files changed, 5 insertions, 18 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 3fe7385bc2..31da773a53 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -641,24 +641,11 @@ return the new list of manifest entries."
(delete-duplicates deps same?))
- (define (package->manifest-entry p output)
- ;; Return a manifest entry for the OUTPUT of package P.
- (check-package-freshness p)
+ (define (package->manifest-entry* package output)
+ (check-package-freshness package)
;; When given a package via `-e', install the first of its
;; outputs (XXX).
- (let* ((output (or output (car (package-outputs p))))
- (deps (map (match-lambda
- ((label package)
- `(,package "out"))
- ((label package output)
- `(,package ,output)))
- (package-transitive-propagated-inputs p))))
- (manifest-entry
- (name (package-name p))
- (version (package-version p))
- (output output)
- (item p)
- (dependencies (delete-duplicates deps)))))
+ (package->manifest-entry package output))
(define upgrade-regexps
(filter-map (match-lambda
@@ -689,7 +676,7 @@ return the new list of manifest entries."
(define to-upgrade
(map (match-lambda
((package output)
- (package->manifest-entry package output)))
+ (package->manifest-entry* package output)))
packages-to-upgrade))
(define packages-to-install
@@ -707,7 +694,7 @@ return the new list of manifest entries."
(define to-install
(append (map (match-lambda
((package output)
- (package->manifest-entry package output)))
+ (package->manifest-entry* package output)))
packages-to-install)
(filter-map (match-lambda
(('install . (? package?))