From: Mathieu Othacehe <m.othacehe@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Cross-compilation broken on canonical packages.
Date: Fri, 03 Jan 2020 13:03:30 +0100 [thread overview]
Message-ID: <87tv5cwxv1.fsf@gmail.com> (raw)
In-Reply-To: <877e29v7qu.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
Hello,
> We could use a thunk field to write something like:
>
> --8<---------------cut here---------------start------------->8---
> (define (default-locale-libcs ...)
> (if target glibc (canonical-package glibc))
> --8<---------------cut here---------------end--------------->8---
>
> But I'd like to avoid that. I'll see if I can figure out something
> better after a good night.
Couldn't find much better, here's a patch, tell my what you think!
Thanks,
Mathieu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-defaut-locale-libc.patch --]
[-- Type: text/x-diff, Size: 2253 bytes --]
From e1728d6c79f63ad72bcfb4e45111ccb9f43f1251 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Fri, 3 Jan 2020 09:23:51 +0100
Subject: [PATCH] defaut locale libc.
---
gnu/system.scm | 3 ++-
gnu/system/locale.scm | 10 +++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 0842bd47c7..faff0320d3 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -211,7 +211,8 @@
(locale-definitions operating-system-locale-definitions ; list of <locale-definition>
(default %default-locale-definitions))
(locale-libcs operating-system-locale-libcs ; list of <packages>
- (default %default-locale-libcs))
+ (thunked)
+ (default (default-locale-libcs)))
(name-service-switch operating-system-name-service-switch ; <name-service-switch>
(default %default-nss))
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index c7a371e9bf..361c024eeb 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -37,7 +37,7 @@
locale-name->definition
locale-directory
- %default-locale-libcs
+ default-locale-libcs
%default-locale-definitions
glibc-supported-locales))
@@ -123,7 +123,7 @@ of LIBC."
(computed-file (string-append "locale-" version) build))
(define* (locale-directory locales
- #:key (libcs %default-locale-libcs))
+ #:key (libcs (default-locale-libcs)))
"Return a locale directory containing all of LOCALES for each libc package
listed in LIBCS.
@@ -145,9 +145,9 @@ data format changes between libc versions."
#:options '(#:local-build? #t
#:substitutable? #f))))))
-(define %default-locale-libcs
- ;; The libcs for which we build locales by default.
- (list glibc))
+(define* (default-locale-libcs
+ #:key (target (%current-target-system)))
+ (if target (list glibc) (list (canonical-package glibc))))
(define %default-locale-definitions
;; Arbitrary set of locales that are built by default. They are here mostly
--
2.24.1
next prev parent reply other threads:[~2020-01-03 12:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 11:49 Cross-compilation broken on canonical packages Mathieu Othacehe
2019-12-14 11:52 ` Mathieu Othacehe
2019-12-19 16:48 ` Ludovic Courtès
2019-12-22 16:31 ` Mathieu Othacehe
2019-12-30 18:48 ` Ludovic Courtès
2019-12-31 9:55 ` Mathieu Othacehe
2020-01-02 18:07 ` Ludovic Courtès
2020-01-02 22:00 ` Mathieu Othacehe
2020-01-03 12:03 ` Mathieu Othacehe [this message]
2020-02-11 13:01 ` Mathieu Othacehe
2020-02-11 14:04 ` Ludovic Courtès
2020-02-12 10:20 ` Mathieu Othacehe
2020-02-24 16:11 ` Ludovic Courtès
2020-03-06 9:19 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tv5cwxv1.fsf@gmail.com \
--to=m.othacehe@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.