From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oAYCNHDUol+VfQAA0tVLHw (envelope-from ) for ; Wed, 04 Nov 2020 16:18:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iUPCL3DUol8ifQAAB5/wlQ (envelope-from ) for ; Wed, 04 Nov 2020 16:18:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4409A9403CD for ; Wed, 4 Nov 2020 16:18:55 +0000 (UTC) Received: from localhost ([::1]:55080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaLUs-0002W1-6p for larch@yhetil.org; Wed, 04 Nov 2020 11:18:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaLQA-0002Ob-Hr for guix-patches@gnu.org; Wed, 04 Nov 2020 11:14:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaLQA-0006tG-5I for guix-patches@gnu.org; Wed, 04 Nov 2020 11:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kaLQ9-0006RZ-W6 for guix-patches@gnu.org; Wed, 04 Nov 2020 11:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44075] [PATCH] gnu: Add make-glibc-locales-collection. Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Nov 2020 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Efraim Flashner , 44075@debbugs.gnu.org Received: via spool by 44075-submit@debbugs.gnu.org id=B44075.160450638424685 (code B ref 44075); Wed, 04 Nov 2020 16:14:01 +0000 Received: (at 44075) by debbugs.gnu.org; 4 Nov 2020 16:13:04 +0000 Received: from localhost ([127.0.0.1]:50362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaLPD-0006Q4-Ml for submit@debbugs.gnu.org; Wed, 04 Nov 2020 11:13:04 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaLPB-0006PS-NB for 44075@debbugs.gnu.org; Wed, 04 Nov 2020 11:13:02 -0500 Received: by mail-wr1-f65.google.com with SMTP id s9so22638728wro.8 for <44075@debbugs.gnu.org>; Wed, 04 Nov 2020 08:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=I/I0OBAld0nSsYgRyrsRgPkfVrcFgrbPfCUWxaL4L7w=; b=XZNxssHBuNdMdf5ayECSObZC0tJjh7tn04/udsyuZM8334Klfuk8mDioAf3Pz+pp1f L9b5XfqIzqQoAmyUBbfX8re8KM3kWX7GG3RaDU/oVXRpYbMf1Uen7crFErIbM4cPgTzp iQObrpdauNUfaTwnI3yBBFl4QpO8/QZTv5z1NXiYv7lIj7FX4oPhGXCV/d6ItQmQw2pL Iz2O9Xy5aYIzHAKJ2r5toJWRcJCoGJqqzSH8CioRvkzwYu1HzCjdYLADStrm58F2kCrt D/yptUTrdd8mdJRyTUNlSs4MB7QSfBhd9kVvsuQ4aiuEZmaPExkcVOLshQusixJIncSf v8Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=I/I0OBAld0nSsYgRyrsRgPkfVrcFgrbPfCUWxaL4L7w=; b=H059paWAPb/LYLkxwLXjyAjCLEGssNmSWFZN9qHJF0FHilsBrVdjbj2ijtLWRJP9QN xVAC8uWGyM6lDvqwfzvEeU5dnrx5hatEay79UYDWsPA7Hql5gSoRL9n3PxfHgbR3yBa0 yeEceiH8F0G5lWcdhlQTkNew+LMWo87h1stdZd2A/bxXm1OWQiipxf3yy+rQ7dqpU1y1 /QK+U67ov9oTtl63hcRovaDRlyfQscYv1dvwnRqrqzkHRbDo3LA7IBXUaiJLXYfwTpPm 8nzz6xjnf59AgY49rmketWLo7qLJEwK1XGq8J5i+9EPkdagAcrC6eXs7WxFHd2hMYWoI WkQw== X-Gm-Message-State: AOAM531LpKvrPYMXgBltdENki7eFoOUeXvc8PrplmGqSTmpeIMzu83g3 weWIBTPpqF1uHUIS15rOjFiLJI3P6YwDIA== X-Google-Smtp-Source: ABdhPJx7t7mMUcZ3fKu3OOxxwr52hmwUvHMOSsL+9IArFwOe4l8P5lxLMw7EOhBoBDxIWtTw2+1LrQ== X-Received: by 2002:adf:a554:: with SMTP id j20mr7840630wrb.182.1604506375406; Wed, 04 Nov 2020 08:12:55 -0800 (PST) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id i11sm1337276wro.85.2020.11.04.08.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 08:12:53 -0800 (PST) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <20201019064739.4736-1-efraim@flashner.co.il> <878sbz1p71.fsf@gnu.org> Date: Wed, 04 Nov 2020 17:12:47 +0100 In-Reply-To: <878sbz1p71.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 21 Oct 2020 19:09:06 +0200") Message-ID: <87a6vx85j4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=XZNxssHB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: Gy/73WYgI3X/ --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi Efraim and Ludo! This patch could be an starting point to even master, it allows to extend easily glibc-utf8-locales to the desired ones. I've used the following steps to test it[1]: ------------------------------>8---------------------------------- $ echo '(define-module (t) #:use-module (gnu packages base)) (define-public glibc-utf8-test (make-glibc-utf8-locales glibc #:locales (list "es_ES") #:name "glibc-utf8-test")) glibc-utf8-test' > tmp/t.scm $ ./pre-inst-env guix build -f tmp/t.scm $ ./pre-inst-env guix package -L tmp --show=glibc-utf8-test ------------------------------8<---------------------------------- Something like glibc-utf8--locales could be easily implemented on top of this, and I think it could be helpful for the end user too. WDYT? Happy hacking! Miguel [1] After checking that ./pre-inst-env guix build glibc-utf8-locales didn't rebuild anything at all, of course. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-base-Add-optional-locales-keyword-to-make-glibc-.patch Content-Transfer-Encoding: quoted-printable Content-Description: utf8-locales.patch From=20b0d2bfbe20a0a48a23a8dd4f14c0acce4ef5842f Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D Date: Wed, 4 Nov 2020 15:48:45 +0100 Subject: [PATCH] gnu: base: Add optional locales keyword to make-glibc-utf8-locales. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/base.scm (make-glibc-utf8-locales): Add keyword parameter locales with the old value as default. [arguments]: Use locales value. Co-authored-by: Efraim Flashner Co-authored-by: Ludovic Court=C3=A8s =2D-- gnu/packages/base.scm | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index c83775d8ee..5170a77270 100644 =2D-- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -52,13 +52,16 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages gettext) + #:use-module (guix i18n) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) + #:use-module (ice-9 format) #:use-module (ice-9 match) + #:use-module (ice-9 optargs) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (glibc @@ -1106,9 +1109,16 @@ to the @code{share/locale} sub-directory of this pac= kage.") ,(version-major+minor (package-version glibc))))))))))) =20 =2D(define-public (make-glibc-utf8-locales glibc) +(define %default-utf8-locales + ;; These are the locales commonly used for tests---e.g., in Guile's i18n + ;; tests. + '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) +(define*-public (make-glibc-utf8-locales glibc #:key + (locales %default-utf8-locales) + (name "glibc-utf8-locales")) + (define default-locales? (equal? locales %default-utf8-locales)) (package =2D (name "glibc-utf8-locales") + (name name) (version (package-version glibc)) (source #f) (build-system trivial-build-system) @@ -1142,17 +1152,22 @@ to the @code{share/locale} sub-directory of this pa= ckage.") (symlink (string-append locale ".utf8") (string-append localedir "/" locale ".UTF-8"))) =2D =2D ;; These are the locales commonly used for =2D ;; tests---e.g., in Guile's i18n tests. =2D '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"= )) + ',locales) #t)))) (native-inputs `(("glibc" ,glibc) ("gzip" ,gzip))) =2D (synopsis "Small sample of UTF-8 locales") + (synopsis (if default-locales? + (P_ "Small sample of UTF-8 locales") + (P_ "Customized sample of UTF-8 locales"))) (description =2D "This package provides a small sample of UTF-8 locales mostly usefu= l in + (if default-locales? + (P_ "This package provides a small sample of UTF-8 locales mostly= useful in test environments.") + (format #f (P_ "This package provides the following UTF-8 locales: +@itemize +~{@item ~a~%~} +@end itemize~%") + locales))) (home-page (package-home-page glibc)) (license (package-license glibc)))) =20 =2D-=20 2.28.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+i0v8ACgkQY0xuiXn6 vsLvVgwAlFel35w8Arwy7EwqBEGzfory3AfNvrAPaZxXsODZISybpTpyhe0ts8U5 sBXqCJddyGdNoemqXD5YStAOyCT2SgaK4XnXTX61g0Gmm/n5izcw16TusjG1dSpg MfjIqRZfsVjbe4WEjepfb1n0T6GAfU0tleqaXeiBQbcTjG8mOy1mNKS373LTR8LW Vuwhhe9vyk4n5R5RRqQqpZ0QkciY9aKVSe4kkVlOMa3utFxZhb9CMcJ2W3sZ6PWY QDD5sxgNdGle23wsp0RD0Vc2t9Akg/ERfKK5vbbqF5cFK9TzpSmzx/MUfz4vNw5L ZDYtizs//JkKupgQxLA/8gH//0CCX0TndktDNH+kM71SR3tNfVY4uVv5pKVO4+oX evu7CqDPx9hRtqzMo0D15Y8qUfuDjVqlm7CuJJjDVEwiDJW4hqoqFCtj8KwsRvIp mG/fC5fInwJn3W2wZh7jkkbwTs27LK9enAHQ6y3NEFLFvIeDNvlSP7p/Fl/ayljB TBn3+Nqa =Oa2h -----END PGP SIGNATURE----- --==-=-=--