summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2021-10-01 11:14:58 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 15:29:42 +0200
commit23f99f1a299ed0e19d926a0f719980b3c151c9c0 (patch)
treef56edca4e0577685bdaf65469d9470f0e748915a /guix/profiles.scm
parentfb368f4e760777e399aa58b08b89df1832fda8ba (diff)
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.
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 2486f91d09..9f30349c69 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -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