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.
This commit is contained in:
Ludovic Courtès 2021-10-01 10:49:22 +02:00
parent e4276fc4c1
commit fb368f4e76
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 66 additions and 1 deletions

View file

@ -353,6 +353,20 @@
(package-transitive-supported-systems d)
(package-transitive-supported-systems e))))
(test-assert "package-development-inputs"
;; Note: Due to propagated inputs, 'package-development-inputs' returns a
;; couple more inputs, such as 'linux-libre-headers'.
(lset<= equal?
`(("source" ,(package-source hello)) ,@(standard-packages))
(package-development-inputs hello)))
(test-assert "package-development-inputs, cross-compilation"
(lset<= equal?
`(("source" ,(package-source hello))
,@(standard-cross-packages "mips64el-linux-gnu" 'host)
,@(standard-cross-packages "mips64el-linux-gnu" 'target))
(package-development-inputs hello #:target "mips64el-linux-gnu")))
(test-assert "package-closure"
(let-syntax ((dummy-package/no-implicit
(syntax-rules ()