summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-01 10:49:22 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 15:29:39 +0200
commitfb368f4e760777e399aa58b08b89df1832fda8ba (patch)
tree6150b4a3fcd60399215901adf865852ddba57215 /guix/packages.scm
parente4276fc4c1c9035971a7d72328e8bea8b165c9c0 (diff)
packages: Add 'package-development-inputs'.
* guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index e5a9d08bce..b99689b9a4 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -153,6 +153,7 @@
bag-transitive-host-inputs
bag-transitive-build-inputs
bag-transitive-target-inputs
+ package-development-inputs
package-closure
default-guile
@@ -1070,6 +1071,15 @@ dependencies are known to build on SYSTEM."
(%current-system (bag-system bag)))
(transitive-inputs (bag-target-inputs bag))))
+(define* (package-development-inputs package
+ #:optional (system (%current-system))
+ #:key target)
+ "Return the list of inputs required by PACKAGE for development purposes on
+SYSTEM. When TARGET is true, return the inputs needed to cross-compile
+PACKAGE from SYSTEM to TRIPLET, where TRIPLET is a triplet such as
+\"aarch64-linux-gnu\"."
+ (bag-transitive-inputs (package->bag package system target)))
+
(define* (package-closure packages #:key (system (%current-system)))
"Return the closure of PACKAGES on SYSTEM--i.e., PACKAGES and the list of
packages they depend on, recursively."