[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/10: profiles: Use 'gexp-input' instead of two-element lists.
From: |
Ludovic Courtès |
Subject: |
05/10: profiles: Use 'gexp-input' instead of two-element lists. |
Date: |
Tue, 17 Mar 2015 21:28:59 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit b4a4bec01a8b990dc4108060a645512f9b428aac
Author: Ludovic Courtès <address@hidden>
Date: Sun Mar 15 21:51:34 2015 +0100
profiles: Use 'gexp-input' instead of two-element lists.
* guix/profiles.scm (package->manifest-entry): Use 'gexp-input' instead
of two-element lists to denote specific package outputs.
(manifest-inputs): Likewise.
(profile-derivation)[info-dir]: Likewise.
---
guix/profiles.scm | 33 +++++++++------------------------
1 files changed, 9 insertions(+), 24 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index d626749..465aaf9 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -155,9 +155,9 @@
omitted or #f, use the first output of PACKAGE."
(let ((deps (map (match-lambda
((label package)
- `(,package "out"))
+ (gexp-input package))
((label package output)
- `(,package ,output)))
+ (gexp-input package output)))
(package-transitive-propagated-inputs package))))
(manifest-entry
(name (package-name package))
@@ -356,22 +356,12 @@ replace it."
;;;
(define (manifest-inputs manifest)
- "Return the list of inputs for MANIFEST. Each input has one of the
-following forms:
-
- (PACKAGE OUTPUT-NAME)
-
-or
-
- STORE-PATH
-"
+ "Return a list of <gexp-input> objects for MANIFEST."
(append-map (match-lambda
- (($ <manifest-entry> name version
- output (? package? package) deps)
- `((,package ,output) ,@deps))
- (($ <manifest-entry> name version output path deps)
- ;; Assume PATH and DEPS are already valid.
- `(,path ,@deps)))
+ (($ <manifest-entry> name version output thing deps)
+ ;; THING may be a package or a file name. In the latter case,
+ ;; assume it's already valid. Ditto for DEPS.
+ (cons (gexp-input thing output) deps)))
(manifest-entries manifest)))
(define (info-dir-file manifest)
@@ -487,16 +477,11 @@ CA-CERTIFICATE-BUNDLE? is #f."
(ca-certificate-bundle manifest)
(return #f))))
(define inputs
- ;; XXX: Here we use tuples of the form (DIR "out") just so that the list
- ;; is unambiguous for the gexp code when MANIFEST has a single input
- ;; denoted as a string (the pattern (DRV STRING) is normally
- ;; interpreted in a gexp as "the STRING output of DRV".). See
- ;; <http://lists.gnu.org/archive/html/guix-devel/2014-12/msg00292.html>.
(append (if info-dir
- `((,info-dir "out"))
+ (list (gexp-input info-dir))
'())
(if ca-cert-bundle
- `((,ca-cert-bundle "out"))
+ (list (gexp-input ca-cert-bundle))
'())
(manifest-inputs manifest)))
- branch master updated (708155d -> 5250a4f), Ludovic Courtès, 2015/03/17
- 01/10: tests: Add an indirection for white-box testing., Ludovic Courtès, 2015/03/17
- 04/10: gexp: Export 'gexp-input' constructor., Ludovic Courtès, 2015/03/17
- 05/10: profiles: Use 'gexp-input' instead of two-element lists.,
Ludovic Courtès <=
- 06/10: gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp., Ludovic Courtès, 2015/03/17
- 08/10: packages: Move grafting parameter to (guix derivations)., Ludovic Courtès, 2015/03/17
- 07/10: gexp: Separate "compilers" for origins and packages from the core., Ludovic Courtès, 2015/03/17
- 10/10: services: guix-service: Remove extraneous monadism., Ludovic Courtès, 2015/03/17
- 09/10: gexp: Move the package and origin compilers to (guix packages)., Ludovic Courtès, 2015/03/17
- 02/10: gexp: Rename <output-ref> to <gexp-output>., Ludovic Courtès, 2015/03/17
- 03/10: gexp: Add <gexp-input>., Ludovic Courtès, 2015/03/17