summaryrefslogtreecommitdiff
path: root/guix/grafts.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-26 22:27:39 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-28 10:39:58 +0100
commit64fd1c01bc6f1be6ffcafc08789d5dafb9850c2e (patch)
tree89d3904f689a542b4f6d3bfa95a9d0784472a2b7 /guix/grafts.scm
parent8856f409d13cd7376be4319b9f75df0692c009d6 (diff)
downloadgnu-guix-64fd1c01bc6f1be6ffcafc08789d5dafb9850c2e.tar
gnu-guix-64fd1c01bc6f1be6ffcafc08789d5dafb9850c2e.tar.gz
grafts: Record metadata as derivation properties.
* guix/grafts.scm (graft-derivation/shallow): Pass #:properties to 'build-expression->derivation'. * tests/grafts.scm ("graft-derivation, grafted item is a direct dependency"): Check the value returned by 'derivation-properties'.
Diffstat (limited to 'guix/grafts.scm')
-rw-r--r--guix/grafts.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/grafts.scm b/guix/grafts.scm
index 01e245d8eb..63f384555b 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -123,6 +123,10 @@ are not recursively applied to dependencies of DRV."
(define add-label
(cut cons "x" <>))
+ (define properties
+ `((type . graft)
+ (graft (count . ,(length grafts)))))
+
(match grafts
((($ <graft> sources source-outputs targets target-outputs) ...)
(let ((sources (zip sources source-outputs))
@@ -140,7 +144,8 @@ are not recursively applied to dependencies of DRV."
,@(append (map add-label sources)
(map add-label targets)))
#:outputs outputs
- #:local-build? #t)))))
+ #:local-build? #t
+ #:properties properties)))))
(define (item->deriver store item)
"Return two values: the derivation that led to ITEM (a store item), and the
name of the output of that derivation ITEM corresponds to (for example