mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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
3 changed files with 27 additions and 27 deletions
|
@ -362,7 +362,7 @@ (define* (switch-to-system os
|
||||||
;; The activation script may modify '%load-path' & co., so protect
|
;; The activation script may modify '%load-path' & co., so protect
|
||||||
;; against that. This is necessary to ensure that
|
;; against that. This is necessary to ensure that
|
||||||
;; 'upgrade-shepherd-services' gets to see the right modules when it
|
;; '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
|
(save-load-path-excursion
|
||||||
(primitive-load (derivation->output-path script))))
|
(primitive-load (derivation->output-path script))))
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,8 @@ (define (match-input thing)
|
||||||
((one (text-file "one" (random-text)))
|
((one (text-file "one" (random-text)))
|
||||||
(two (gexp->derivation "two"
|
(two (gexp->derivation "two"
|
||||||
#~(symlink #$one #$output:chbouib)))
|
#~(symlink #$one #$output:chbouib)))
|
||||||
(drv (gexp->derivation "ref-graphs"
|
(build -> (with-imported-modules '((guix build store-copy)
|
||||||
|
(guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build store-copy))
|
(use-modules (guix build store-copy))
|
||||||
(with-output-to-file #$output
|
(with-output-to-file #$output
|
||||||
|
@ -615,12 +616,11 @@ (define (match-input thing)
|
||||||
(with-output-to-file #$output:two
|
(with-output-to-file #$output:two
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(write (call-with-input-file "two"
|
(write (call-with-input-file "two"
|
||||||
read-reference-graph)))))
|
read-reference-graph)))))))
|
||||||
|
(drv (gexp->derivation "ref-graphs" build
|
||||||
#:references-graphs `(("one" ,one)
|
#:references-graphs `(("one" ,one)
|
||||||
("two" ,two "chbouib")
|
("two" ,two "chbouib")
|
||||||
("guile" ,%bootstrap-guile))
|
("guile" ,%bootstrap-guile))))
|
||||||
#:modules '((guix build store-copy)
|
|
||||||
(guix build utils))))
|
|
||||||
(ok? (built-derivations (list drv)))
|
(ok? (built-derivations (list drv)))
|
||||||
(guile-drv (package->derivation %bootstrap-guile))
|
(guile-drv (package->derivation %bootstrap-guile))
|
||||||
(bash (interned-file (search-bootstrap-binary "bash"
|
(bash (interned-file (search-bootstrap-binary "bash"
|
||||||
|
|
|
@ -135,14 +135,14 @@ (define %mkdir
|
||||||
(replacement fake)))
|
(replacement fake)))
|
||||||
(drv (gexp->derivation
|
(drv (gexp->derivation
|
||||||
"to-graft"
|
"to-graft"
|
||||||
|
(with-imported-modules '((guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
(mkdir-p (string-append #$output
|
(mkdir-p (string-append #$output
|
||||||
"/a/b/c/d"))
|
"/a/b/c/d"))
|
||||||
(symlink #$%bash
|
(symlink #$%bash
|
||||||
(string-append #$output
|
(string-append #$output
|
||||||
"/bash")))
|
"/bash"))))))
|
||||||
#:modules '((guix build utils))))
|
|
||||||
(grafted ((store-lift graft-derivation) drv
|
(grafted ((store-lift graft-derivation) drv
|
||||||
(list graft)))
|
(list graft)))
|
||||||
(_ (built-derivations (list grafted)))
|
(_ (built-derivations (list grafted)))
|
||||||
|
|
Loading…
Reference in a new issue