summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/packages.scm10
-rw-r--r--guix/scripts/environment.scm2
2 files changed, 11 insertions, 1 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."
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 6958bd6238..418f11c37e 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -82,7 +82,7 @@ package."
packages for PACKAGE."
;; Remove non-package inputs such as origin records.
(filter-map input->manifest-entry
- (bag-transitive-inputs (package->bag package))))
+ (package-development-inputs package)))
(define (show-help)
(display (G_ "Usage: guix environment [OPTION]... PACKAGE... [-- COMMAND...]