From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gCK7LlSdcWU12QAAauVa8A:P1 (envelope-from ) for ; Thu, 07 Dec 2023 11:24:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gCK7LlSdcWU12QAAauVa8A (envelope-from ) for ; Thu, 07 Dec 2023 11:24:20 +0100 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 848A863B7B for ; Thu, 7 Dec 2023 11:24:20 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="EsmhjB/n"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701944660; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=f2+/BbyoT/DtobZNx3pL0z1LDDF2Y7AMEH40nL5ySkw=; b=fO90um9dfHTst3KgE7+HQ4jj19iXt4rODDetM5R7hUKXjxxFPMNN235Kg0nyZIIXih2M4y /WF+3ODHc9w/C9cH0nX2hXmk4bgnlxF6YFNh3fdN3RZzilFMBizxNeKtTrT8+pwAzjcri3 wtVDXChdC8kOE93CttcKMEtF7bMbWxXahFeUPCfH2YKLJOJ6kgNctYhMsj388j6ZdXK6Ru o8tXTxTkjbIWzQdAIzVqYcj//dg/djfbvGXTyOCm8um7xjH8raKc13VRhNLC6D+xEu3M63 yYybZWBRqfdGvgi+5nbV+hoXIaDcd8SSn0RWqqt2m1tFGCcSmPuViTntip1HgQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="EsmhjB/n"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701944660; a=rsa-sha256; cv=none; b=ZqwdH8PSCFAb1pEKRwWo8lu+TF/2Gv+EAzQyMgY5mSvKtv/1qxr814aQ6BAj16jXQfoZux LC4OB8ikJ/ZG7bGkWHsQBOv1kCUj39vzdXOxr5taXQe3jTiPOydpQMS+evSGPWCHdFHY11 dktleaCjKD2G28jjVGMkzlPUfyM5QStw3UkkxXy8TfVDGWMiO9wsfDj8C9femWh+r/SWSZ FjL4TXmilva8HIP3aY03/7L4zwRd5QXYYNK6MPS9w/qAAOq+sjq/6fAb6qcFE56081TiGE 8qHlKH+cF5SGCDp5o06FfbjZ5kX1bHmjBoCEFSizWpgTWKLRxQ7xADYTx0gqlA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBBXz-0003KU-B3; Thu, 07 Dec 2023 05:23:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBBXq-0003IT-Jn for guix-patches@gnu.org; Thu, 07 Dec 2023 05:23:50 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBBXq-0000qf-Bv for guix-patches@gnu.org; Thu, 07 Dec 2023 05:23:50 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBBY2-0005XB-JM for guix-patches@gnu.org; Thu, 07 Dec 2023 05:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67686] [PATCH core-updates 2/5] gnu: glibc-utf8-locales: Generalize and use gexps. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Dec 2023 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67686 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67686@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 67686-submit@debbugs.gnu.org id=B67686.170194460521191 (code B ref 67686); Thu, 07 Dec 2023 10:24:02 +0000 Received: (at 67686) by debbugs.gnu.org; 7 Dec 2023 10:23:25 +0000 Received: from localhost ([127.0.0.1]:41136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBXR-0005VY-4K for submit@debbugs.gnu.org; Thu, 07 Dec 2023 05:23:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBXO-0005Uu-HH for 67686@debbugs.gnu.org; Thu, 07 Dec 2023 05:23:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBBX6-0000jD-VC; Thu, 07 Dec 2023 05:23:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=f2+/BbyoT/DtobZNx3pL0z1LDDF2Y7AMEH40nL5ySkw=; b=EsmhjB/n3MIbyjSfUhjc LoPnGAAtK5oDiPo6hhFvh702nukJjUlwmvdJ7UxPgWLEGcNCTehIAzGrQlHyfbIr/TFGhIAdY3/7j YyR+CoDuPLaFosbYTtfwekIy5bN0YqW3tau65q8chFttYJARHPVh31OprdI8OFK+v0RzQ8CS/edan nv/jXs2EPFgAlJ5BoitIFhcMERZA2Zd35bUthPpNovWyX79GRiFHf687tPHRinINaT18qa0SrNcUc O8KMgHrFF3A+Mlj1DyM7ekv+sAHF6vZgXqjncC892vEZmwABG+1l6glqw28+2lyhE3MPoYoDm83RM V1JwQoUQ7WXpVw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 7 Dec 2023 11:22:45 +0100 Message-ID: <614bd1b35c61d23a3de82c292cf3f55d52b56b29.1701943221.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 848A863B7B X-Spam-Score: -5.85 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.85 X-TUID: tHp3GpchlzDp Previously code was dependent on the ‘name’ field of the GLIBC package. * gnu/packages/base.scm (make-glibc-utf8-locales): Use gexps. Replace references to ‘%build-inputs’ by calls to ‘which’. Replace reference to ‘version’ by (package-version this-package). Change-Id: I1e7003047aa85df74069b233191ab331b5f887b6 --- gnu/packages/base.scm | 67 +++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index b4982107b2..f95ae1b679 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1348,47 +1348,52 @@ (define %default-utf8-locales (define*-public (make-glibc-utf8-locales glibc #:key (locales %default-utf8-locales) (name "glibc-utf8-locales")) - (define default-locales? (equal? locales %default-utf8-locales)) + (define default-locales? + (equal? locales %default-utf8-locales)) + (package (name name) (version (package-version glibc)) (source #f) (build-system trivial-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) + (list #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) - (let* ((libc (assoc-ref %build-inputs "glibc")) - (gzip (assoc-ref %build-inputs "gzip")) - (out (assoc-ref %outputs "out")) - (localedir (string-append out "/lib/locale/" - ,(version-major+minor version)))) - ;; 'localedef' needs 'gzip'. - (setenv "PATH" (string-append libc "/bin:" gzip "/bin")) + (let* ((libc (dirname + (search-input-file %build-inputs + "/bin/localedef"))) + (gzip (dirname + (search-input-file %build-inputs + "/bin/gzip"))) + (out #$output) + (localedir (string-append out "/lib/locale/" + #$(version-major+minor + (package-version this-package))))) + ;; 'localedef' needs 'gzip'. + (setenv "PATH" (string-append libc ":" gzip "")) - (mkdir-p localedir) - (for-each (lambda (locale) - (define file - ;; Use the "normalized codeset" by - ;; default--e.g., "en_US.utf8". - (string-append localedir "/" locale ".utf8")) + (mkdir-p localedir) + (for-each (lambda (locale) + (define file + ;; Use the "normalized codeset" by + ;; default--e.g., "en_US.utf8". + (string-append localedir "/" locale ".utf8")) - (invoke "localedef" "--no-archive" - "--prefix" localedir - "-i" locale - "-f" "UTF-8" file) + (invoke "localedef" "--no-archive" + "--prefix" localedir + "-i" locale + "-f" "UTF-8" file) - ;; For backward compatibility with Guix - ;; <= 0.8.3, add "xx_YY.UTF-8". - (symlink (string-append locale ".utf8") - (string-append localedir "/" - locale ".UTF-8"))) - ',locales) - #t)))) - (native-inputs - `(("glibc" ,glibc) - ("gzip" ,gzip))) + ;; For backward compatibility with Guix + ;; <= 0.8.3, add "xx_YY.UTF-8". + (symlink (string-append locale ".utf8") + (string-append localedir "/" + locale ".UTF-8"))) + '#$locales))))) + (native-inputs (list glibc gzip)) (synopsis (if default-locales? (P_ "Small sample of UTF-8 locales") (P_ "Customized sample of UTF-8 locales"))) -- 2.41.0