[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/06: grafts: Shallow grafting can be performed on a subset of the outp
From: |
Ludovic Courtès |
Subject: |
01/06: grafts: Shallow grafting can be performed on a subset of the outputs. |
Date: |
Tue, 24 Jan 2017 22:11:34 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit fd7d1235f1d2e053bbc20d555bd9eed889845ca2
Author: Ludovic Courtès <address@hidden>
Date: Tue Jan 24 17:48:24 2017 +0100
grafts: Shallow grafting can be performed on a subset of the outputs.
* guix/grafts.scm (graft-derivation/shallow): Add #:outputs parameter.
[outputs]: Rename to...
[output-pairs]: ... this. Adjust 'build-expression->derivation' call
accordingly.
---
guix/grafts.scm | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/guix/grafts.scm b/guix/grafts.scm
index e14a40f..e44fc05 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -78,11 +78,12 @@
(define* (graft-derivation/shallow store drv grafts
#:key
(name (derivation-name drv))
+ (outputs (derivation-output-names drv))
(guile (%guile-for-build))
(system (%current-system)))
- "Return a derivation called NAME, based on DRV but with all the GRAFTS
-applied. This procedure performs \"shallow\" grafting in that GRAFTS are not
-recursively applied to dependencies of DRV."
+ "Return a derivation called NAME, which applies GRAFTS to the specified
+OUTPUTS of DRV. This procedure performs \"shallow\" grafting in that GRAFTS
+are not recursively applied to dependencies of DRV."
;; XXX: Someday rewrite using gexps.
(define mapping
;; List of store item pairs.
@@ -96,14 +97,12 @@ recursively applied to dependencies of DRV."
target))))
grafts))
- (define outputs
- (map (match-lambda
- ((name . output)
- (cons name (derivation-output-path output))))
- (derivation-outputs drv)))
-
- (define output-names
- (derivation-output-names drv))
+ (define output-pairs
+ (map (lambda (output)
+ (cons output
+ (derivation-output-path
+ (assoc-ref (derivation-outputs drv) output))))
+ outputs))
(define build
`(begin
@@ -111,7 +110,7 @@ recursively applied to dependencies of DRV."
(guix build utils)
(ice-9 match))
- (let* ((old-outputs ',outputs)
+ (let* ((old-outputs ',output-pairs)
(mapping (append ',mapping
(map (match-lambda
((name . file)
@@ -143,10 +142,10 @@ recursively applied to dependencies of DRV."
(guix build utils))
#:inputs `(,@(map (lambda (out)
`("x" ,drv ,out))
- output-names)
+ outputs)
,@(append (map add-label
sources)
(map add-label
targets)))
- #:outputs output-names
+ #:outputs outputs
#:local-build? #t)))))
(define (item->deriver store item)
"Return two values: the derivation that led to ITEM (a store item), and the
- branch master updated (0769cea -> 9b1a497), Ludovic Courtès, 2017/01/24
- 01/06: grafts: Shallow grafting can be performed on a subset of the outputs.,
Ludovic Courtès <=
- 03/06: gnu: Add hyperestraier., Ludovic Courtès, 2017/01/24
- 05/06: gnu: arandr: Remove timestamps from gzipped man pages., Ludovic Courtès, 2017/01/24
- 02/06: gnu: Add qdbm., Ludovic Courtès, 2017/01/24
- 06/06: gnu: haunt: Update to 0.2.1, Ludovic Courtès, 2017/01/24
- 04/06: mapped-devices: 'source' can be a list of strings., Ludovic Courtès, 2017/01/24