mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
profiles: Add 'package->development-manifest'.
* guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
This commit is contained in:
parent
fb368f4e76
commit
23f99f1a29
4 changed files with 42 additions and 22 deletions
|
@ -124,6 +124,7 @@
|
|||
|
||||
profile-manifest
|
||||
package->manifest-entry
|
||||
package->development-manifest
|
||||
packages->manifest
|
||||
ca-certificate-bundle
|
||||
%default-profile-hooks
|
||||
|
@ -400,6 +401,24 @@ file name."
|
|||
(properties properties))))
|
||||
entry))
|
||||
|
||||
(define* (package->development-manifest package
|
||||
#:optional
|
||||
(system (%current-system))
|
||||
#:key target)
|
||||
"Return a manifest for the \"development inputs\" of PACKAGE for SYSTEM,
|
||||
optionally when cross-compiling to TARGET. Development inputs include both
|
||||
explicit and implicit inputs of PACKAGE."
|
||||
(manifest
|
||||
(filter-map (match-lambda
|
||||
((label (? package? package))
|
||||
(package->manifest-entry package))
|
||||
((label (? package? package) output)
|
||||
(package->manifest-entry package output))
|
||||
;; TODO: Support <inferior-package>.
|
||||
(_
|
||||
#f))
|
||||
(package-development-inputs package system #:target target))))
|
||||
|
||||
(define (packages->manifest packages)
|
||||
"Return a list of manifest entries, one for each item listed in PACKAGES.
|
||||
Elements of PACKAGES can be either package objects or package/string tuples
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue