mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
gexp: Allow <gexp-input> objects in #:allowed-references.
* guix/gexp.scm (lower-references): Add <gexp-input> case.
* tests/gexp.scm ("gexp->derivation #:allowed-references, specific
output"): New test.
This commit is contained in:
@@ -497,6 +497,23 @@
|
||||
(list "out" %bootstrap-guile))))
|
||||
(built-derivations (list drv))))
|
||||
|
||||
(test-assertm "gexp->derivation #:allowed-references, specific output"
|
||||
(mlet* %store-monad ((in (gexp->derivation "thing"
|
||||
#~(begin
|
||||
(mkdir #$output:ok)
|
||||
(mkdir #$output:not-ok))))
|
||||
(drv (gexp->derivation "allowed-refs"
|
||||
#~(begin
|
||||
(pk #$in:not-ok)
|
||||
(mkdir #$output)
|
||||
(chdir #$output)
|
||||
(symlink #$output "self")
|
||||
(symlink #$in:ok "ok"))
|
||||
#:allowed-references
|
||||
(list "out"
|
||||
(gexp-input in "ok")))))
|
||||
(built-derivations (list drv))))
|
||||
|
||||
(test-assert "gexp->derivation #:allowed-references, disallowed"
|
||||
(let ((drv (run-with-store %store
|
||||
(gexp->derivation "allowed-refs"
|
||||
|
||||
Reference in New Issue
Block a user