gexp: Remove more uses of #:modules.
* guix/scripts/system.scm (switch-to-system): Adjust comment. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Use 'with-imported-modules' instead of #:modules. * tests/grafts.scm ("graft-derivation, preserve empty directories"): Likewise.
This commit is contained in:
parent
9c14a487bb
commit
66a35ceb43
|
@ -362,7 +362,7 @@ it atomically, and then run OS's activation script."
|
|||
;; The activation script may modify '%load-path' & co., so protect
|
||||
;; against that. This is necessary to ensure that
|
||||
;; 'upgrade-shepherd-services' gets to see the right modules when it
|
||||
;; computes derivations with (gexp->derivation #:modules …).
|
||||
;; computes derivations with 'gexp->derivation'.
|
||||
(save-load-path-excursion
|
||||
(primitive-load (derivation->output-path script))))
|
||||
|
||||
|
|
|
@ -601,26 +601,26 @@
|
|||
((one (text-file "one" (random-text)))
|
||||
(two (gexp->derivation "two"
|
||||
#~(symlink #$one #$output:chbouib)))
|
||||
(drv (gexp->derivation "ref-graphs"
|
||||
#~(begin
|
||||
(use-modules (guix build store-copy))
|
||||
(with-output-to-file #$output
|
||||
(lambda ()
|
||||
(write (call-with-input-file "guile"
|
||||
read-reference-graph))))
|
||||
(with-output-to-file #$output:one
|
||||
(lambda ()
|
||||
(write (call-with-input-file "one"
|
||||
read-reference-graph))))
|
||||
(with-output-to-file #$output:two
|
||||
(lambda ()
|
||||
(write (call-with-input-file "two"
|
||||
read-reference-graph)))))
|
||||
(build -> (with-imported-modules '((guix build store-copy)
|
||||
(guix build utils))
|
||||
#~(begin
|
||||
(use-modules (guix build store-copy))
|
||||
(with-output-to-file #$output
|
||||
(lambda ()
|
||||
(write (call-with-input-file "guile"
|
||||
read-reference-graph))))
|
||||
(with-output-to-file #$output:one
|
||||
(lambda ()
|
||||
(write (call-with-input-file "one"
|
||||
read-reference-graph))))
|
||||
(with-output-to-file #$output:two
|
||||
(lambda ()
|
||||
(write (call-with-input-file "two"
|
||||
read-reference-graph)))))))
|
||||
(drv (gexp->derivation "ref-graphs" build
|
||||
#:references-graphs `(("one" ,one)
|
||||
("two" ,two "chbouib")
|
||||
("guile" ,%bootstrap-guile))
|
||||
#:modules '((guix build store-copy)
|
||||
(guix build utils))))
|
||||
("guile" ,%bootstrap-guile))))
|
||||
(ok? (built-derivations (list drv)))
|
||||
(guile-drv (package->derivation %bootstrap-guile))
|
||||
(bash (interned-file (search-bootstrap-binary "bash"
|
||||
|
|
|
@ -135,14 +135,14 @@
|
|||
(replacement fake)))
|
||||
(drv (gexp->derivation
|
||||
"to-graft"
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(mkdir-p (string-append #$output
|
||||
"/a/b/c/d"))
|
||||
(symlink #$%bash
|
||||
(string-append #$output
|
||||
"/bash")))
|
||||
#:modules '((guix build utils))))
|
||||
(with-imported-modules '((guix build utils))
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(mkdir-p (string-append #$output
|
||||
"/a/b/c/d"))
|
||||
(symlink #$%bash
|
||||
(string-append #$output
|
||||
"/bash"))))))
|
||||
(grafted ((store-lift graft-derivation) drv
|
||||
(list graft)))
|
||||
(_ (built-derivations (list grafted)))
|
||||
|
|
Loading…
Reference in New Issue