mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-12 09:56:14 -05:00
profiles: Add 'map-manifest-entries'.
* guix/scripts/pack.scm (map-manifest-entries): Move to... * guix/profiles.scm (map-manifest-entries): ... here.
This commit is contained in:
parent
1e30d4e0df
commit
8a705ae4c6
2 changed files with 6 additions and 5 deletions
|
@ -93,6 +93,7 @@ (define-module (guix profiles)
|
|||
manifest-pattern-output
|
||||
|
||||
concatenate-manifests
|
||||
map-manifest-entries
|
||||
manifest-remove
|
||||
manifest-add
|
||||
manifest-lookup
|
||||
|
@ -520,6 +521,11 @@ (define (concatenate-manifests lst)
|
|||
"Concatenate the manifests listed in LST and return the resulting manifest."
|
||||
(manifest (append-map manifest-entries lst)))
|
||||
|
||||
(define (map-manifest-entries proc manifest)
|
||||
"Apply PROC to all the entries of MANIFEST and return a new manifest."
|
||||
(make-manifest
|
||||
(map proc (manifest-entries manifest))))
|
||||
|
||||
(define (entry-predicate pattern)
|
||||
"Return a procedure that returns #t when passed a manifest entry that
|
||||
matches NAME/OUTPUT/VERSION. OUTPUT and VERSION may be #f, in which case they
|
||||
|
|
|
@ -753,11 +753,6 @@ (define (wrapped-manifest-entry entry . args)
|
|||
(manifest-entry-output entry)
|
||||
args))))
|
||||
|
||||
(define (map-manifest-entries proc manifest)
|
||||
"Apply PROC to all the entries of MANIFEST and return a new manifest."
|
||||
(make-manifest
|
||||
(map proc (manifest-entries manifest))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Command-line options.
|
||||
|
|
Loading…
Reference in a new issue