profiles: Add 'properties' field to manifest entries.
* guix/profiles.scm (<manifest-entry>)[properties]: New field. (manifest->gexp)[entry->gexp]: Serialize it. (sexp->manifest)[sexp->manifest-entry]: Deserialize it.
This commit is contained in:
parent
c423ae8918
commit
f6f2346f9b
|
@ -78,6 +78,7 @@
|
||||||
manifest-entry-dependencies
|
manifest-entry-dependencies
|
||||||
manifest-entry-search-paths
|
manifest-entry-search-paths
|
||||||
manifest-entry-parent
|
manifest-entry-parent
|
||||||
|
manifest-entry-properties
|
||||||
|
|
||||||
manifest-pattern
|
manifest-pattern
|
||||||
manifest-pattern?
|
manifest-pattern?
|
||||||
|
@ -181,7 +182,9 @@
|
||||||
(search-paths manifest-entry-search-paths ; search-path-specification*
|
(search-paths manifest-entry-search-paths ; search-path-specification*
|
||||||
(default '()))
|
(default '()))
|
||||||
(parent manifest-entry-parent ; promise (#f | <manifest-entry>)
|
(parent manifest-entry-parent ; promise (#f | <manifest-entry>)
|
||||||
(default (delay #f))))
|
(default (delay #f)))
|
||||||
|
(properties manifest-entry-properties ; list of symbol/value pairs
|
||||||
|
(default '())))
|
||||||
|
|
||||||
(define-record-type* <manifest-pattern> manifest-pattern
|
(define-record-type* <manifest-pattern> manifest-pattern
|
||||||
make-manifest-pattern
|
make-manifest-pattern
|
||||||
|
@ -320,18 +323,20 @@ denoting a specific output of a package."
|
||||||
(define (entry->gexp entry)
|
(define (entry->gexp entry)
|
||||||
(match entry
|
(match entry
|
||||||
(($ <manifest-entry> name version output (? string? path)
|
(($ <manifest-entry> name version output (? string? path)
|
||||||
(deps ...) (search-paths ...))
|
(deps ...) (search-paths ...) _ (properties ...))
|
||||||
#~(#$name #$version #$output #$path
|
#~(#$name #$version #$output #$path
|
||||||
(propagated-inputs #$(map entry->gexp deps))
|
(propagated-inputs #$(map entry->gexp deps))
|
||||||
(search-paths #$(map search-path-specification->sexp
|
(search-paths #$(map search-path-specification->sexp
|
||||||
search-paths))))
|
search-paths))
|
||||||
|
(properties . #$properties)))
|
||||||
(($ <manifest-entry> name version output package
|
(($ <manifest-entry> name version output package
|
||||||
(deps ...) (search-paths ...))
|
(deps ...) (search-paths ...) _ (properties ...))
|
||||||
#~(#$name #$version #$output
|
#~(#$name #$version #$output
|
||||||
(ungexp package (or output "out"))
|
(ungexp package (or output "out"))
|
||||||
(propagated-inputs #$(map entry->gexp deps))
|
(propagated-inputs #$(map entry->gexp deps))
|
||||||
(search-paths #$(map search-path-specification->sexp
|
(search-paths #$(map search-path-specification->sexp
|
||||||
search-paths))))))
|
search-paths))
|
||||||
|
(properties . #$properties)))))
|
||||||
|
|
||||||
(match manifest
|
(match manifest
|
||||||
(($ <manifest> (entries ...))
|
(($ <manifest> (entries ...))
|
||||||
|
@ -394,7 +399,9 @@ procedure is here for backward-compatibility and will eventually vanish."
|
||||||
(dependencies deps*)
|
(dependencies deps*)
|
||||||
(search-paths (map sexp->search-path-specification
|
(search-paths (map sexp->search-path-specification
|
||||||
search-paths))
|
search-paths))
|
||||||
(parent parent))))
|
(parent parent)
|
||||||
|
(properties (or (assoc-ref extra-stuff 'properties)
|
||||||
|
'())))))
|
||||||
entry))))
|
entry))))
|
||||||
|
|
||||||
(match sexp
|
(match sexp
|
||||||
|
|
Loading…
Reference in New Issue