From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: Re: Cross-compilation broken on canonical packages. Date: Fri, 03 Jan 2020 13:03:30 +0100 Message-ID: <87tv5cwxv1.fsf@gmail.com> References: <878snff7pv.fsf@gmail.com> <877e2zf7kv.fsf@gmail.com> <871rt0ntvy.fsf@gnu.org> <87fthc9vav.fsf@gmail.com> <87y2ut645u.fsf@gnu.org> <87tv5gbz0o.fsf@gmail.com> <87blrlu3zv.fsf@gnu.org> <877e29v7qu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36497) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inLg0-0006qb-67 for guix-devel@gnu.org; Fri, 03 Jan 2020 07:03:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inLfy-0004Sk-VG for guix-devel@gnu.org; Fri, 03 Jan 2020 07:03:36 -0500 In-reply-to: <877e29v7qu.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-defaut-locale-libc.patch >From e1728d6c79f63ad72bcfb4e45111ccb9f43f1251 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe 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 (default %default-locale-definitions)) (locale-libcs operating-system-locale-libcs ; list of - (default %default-locale-libcs)) + (thunked) + (default (default-locale-libcs))) (name-service-switch operating-system-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 --=-=-=--