Skip to content
Snippets Groups Projects
Unverified Commit 99b23eab authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

installer: Do not include the host (guix config).

Previously, "locales.drv" would depend on the host's (guix config).
Thus, the derivation would depend on details of the user's installation.

* gnu/installer.scm (not-config?): New procedure.
(build-compiled-file): Pass it to 'source-module-closure' and use
'make-config.scm'.
parent 363989e6
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,14 @@ (define module-to-import? ...@@ -61,6 +61,14 @@ (define module-to-import?
(('guix 'build _ ...) #t) (('guix 'build _ ...) #t)
(_ #f))) (_ #f)))
(define not-config?
;; Select (guix …) and (gnu …) modules, except (guix config).
(match-lambda
(('guix 'config) #f)
(('guix _ ...) #t)
(('gnu _ ...) #t)
(_ #f)))
(define* (build-compiled-file name locale-builder) (define* (build-compiled-file name locale-builder)
"Return a file-like object that evalutes the gexp LOCALE-BUILDER and store "Return a file-like object that evalutes the gexp LOCALE-BUILDER and store
its result in the scheme file NAME. The derivation will also build a compiled its result in the scheme file NAME. The derivation will also build a compiled
...@@ -75,8 +83,10 @@ (define set-utf8-locale ...@@ -75,8 +83,10 @@ (define set-utf8-locale
(define builder (define builder
(with-extensions (list guile-json-3) (with-extensions (list guile-json-3)
(with-imported-modules (source-module-closure (with-imported-modules `(,@(source-module-closure
'((gnu installer locale))) '((gnu installer locale))
#:select? not-config?)
((guix config) => ,(make-config.scm)))
#~(begin #~(begin
(use-modules (gnu installer locale)) (use-modules (gnu installer locale))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment