diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-03-22 15:51:40 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-22 16:49:47 +0100 |
commit | 99b23eabdbb660b46403649997c3ed41aeab95bb (patch) | |
tree | 6d64bf50e4706cc68eca6bbadd38f2b77981d782 | |
parent | 363989e6689068daeca81b442358b183b7d983d1 (diff) | |
download | guix-99b23eabdbb660b46403649997c3ed41aeab95bb.tar.gz |
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'.
-rw-r--r-- | gnu/installer.scm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm index 6c11fa6198..50f5b1aa77 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -61,6 +61,14 @@ (('guix 'build _ ...) #t) (_ #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) "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 @@ -75,8 +83,10 @@ version of this file." (define builder (with-extensions (list guile-json-3) - (with-imported-modules (source-module-closure - '((gnu installer locale))) + (with-imported-modules `(,@(source-module-closure + '((gnu installer locale)) + #:select? not-config?) + ((guix config) => ,(make-config.scm))) #~(begin (use-modules (gnu installer locale)) |