Attila Lendvai schreef op di 19-04-2022 om 11:38 [+0000]: > > thank you, this works indeed as a band aid: > > > > (setenv "GUIX_LOCPATH" #+(file-append glibc-locales "/lib/locale")) > > (setlocale LC_ALL "en_US.utf8") > > > i spoke too early. this works in a git checkout of guix, but it fails > to compile when i try to guix pull it. > > even if i declare the dependency like this: > > #:autoload (gnu packages base) (glibc-locales) > > IIUC, this is due to a circular dependency: glibc-locales (and its > variants) depend on git-fetch, therefore i cannot refer to them from > the implementation of git-fetch.
The module of the glibc-locales package depends on git-fetch, but I don't think the package glibc-locales does. Anyway, circular imports are messy and (guix build-system ...) and (guix git-download) use an extra-lazy variant of #:autoload that doesn't load the module even when compiling (*). (*) Limitation: this method cannot be used to use macros. Maybe the attached variant works? Greetings, Maxime.
diff --git a/guix/git-download.scm b/guix/git-download.scm index 5e624b9ae9..a74ba5f592 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -104,6 +104,9 @@ (define guile-zlib (define gnutls (module-ref (resolve-interface '(gnu packages tls)) 'gnutls)) + (define glibc-locales + (module-ref (resolve-interface '(gnu packages base)) 'glibc-locales)) + (define modules (delete '(guix config) (source-module-closure '((guix build git) @@ -122,6 +125,8 @@ (define build (guix swh) (ice-9 match)) + (pk #+glibc-locales) + (error "see the pk") (define recursive? (call-with-input-string (getenv "git recursive?") read))
signature.asc
Description: This is a digitally signed message part