From patchwork Fri Apr 12 13:15:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 3271 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E034616E5D; Fri, 12 Apr 2019 14:25:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BA9A716E5B for ; Fri, 12 Apr 2019 14:25:10 +0100 (BST) Received: from localhost ([127.0.0.1]:37253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEwB3-0004PV-3n for patchwork@mira.cbaines.net; Fri, 12 Apr 2019 09:25:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEw3Q-000207-90 for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEw3M-00058t-B2 for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:16 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEw3F-00053G-IF for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hEw3F-0003Mc-CU for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35244] [PATCH 3/6] gnu: glibc-utf8-locales: Always use native package. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Apr 2019 13:17:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35244 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35244@debbugs.gnu.org Received: via spool by 35244-submit@debbugs.gnu.org id=B35244.155507498612829 (code B ref 35244); Fri, 12 Apr 2019 13:17:05 +0000 Received: (at 35244) by debbugs.gnu.org; 12 Apr 2019 13:16:26 +0000 Received: from localhost ([127.0.0.1]:55631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEw2Y-0003Ke-P4 for submit@debbugs.gnu.org; Fri, 12 Apr 2019 09:16:26 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:36115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEw2M-0003JD-3N for 35244@debbugs.gnu.org; Fri, 12 Apr 2019 09:16:15 -0400 Received: by mail-wm1-f53.google.com with SMTP id h18so10996837wml.1 for <35244@debbugs.gnu.org>; Fri, 12 Apr 2019 06:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1l19LfrN4LoFQJPK2/aWVF5HNucP7ayb/09Mx0r9Gao=; b=sqSncxvFch9fQjNST44geYbloRCpZhg6NgW09tha9nBrd4UHIIORpaPQJtyzS1bLHr Z2r+L6N6mEvI63uwYPuTB7C+M2yDGYPUUnTwQinZUfvkMQ2RqD4TmWqz72pDrGPNO8Bo vkjK4lRTQzooeMe20anvscuTDy0m/jXa3BSelq8VZeXewxRjwGM8Y0BJV3gg/Bg49kYE W3hlRpAv+YhpF8i/2EuqsCpR1wiDQM1ug3hZJ/a9qGYNFkCOoq74R4KFAEs9XKW+nTj2 EDmv78r35QD7STCyJpdnViomPW+govBYaKWQl83yBB38o4U4w/n3x9grMQN6jYW2vIY9 mt4g== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1l19LfrN4LoFQJPK2/aWVF5HNucP7ayb/09Mx0r9Gao=; b=LmBVtoej6c1L9K/yzYUORPkrp1EKGEbR95al+YXuEnZUY68TPPf/DP591BzZrcku+Q V/aLXPciruend2wiwhwR1rV1kRXGxRcXReQo4kYl4SnzqU8WgpqgiK2597p5DwAkqqUX kR0LEZiRJXjyEgOgXR71mgMtTVDn7lp5z5lYeqppzZG1iHixORg1G4o1u+x7nnLfQv45 wX5m4AlhxJZ2JHYaPhceZbO5MYDfI3bbVoV5xw3np8x7DWsS/F7VRhzIS47IUlOQWJCF JAL5rl3BnT/GGV9LEO+By8Ev6A5SL03MZAcgzszqy8gjXsyH+Eweo0mMbpqHpWHMarhv lOew== X-Gm-Message-State: APjAAAXVq+pCGSRZm7ZmBBT1QZWQtRmTmccjtrWDcxgFlqdoWvmvjj6L 63cWxch0j3rNYc/vnVGv/j2EY+IO X-Google-Smtp-Source: APXvYqz5317vF20qF75LZeo7qj6byvb97j9nKwYnhxuOPS+oSL3WETdWifJv9C0UeJij7s338plcRQ== X-Received: by 2002:a1c:6c04:: with SMTP id h4mr11238372wmc.135.1555074964296; Fri, 12 Apr 2019 06:16:04 -0700 (PDT) Received: from fuji.Parrot.Biz (smtp.parrot.biz. [62.23.167.188]) by smtp.gmail.com with ESMTPSA id d4sm35932882wrv.42.2019.04.12.06.16.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 06:16:03 -0700 (PDT) From: Mathieu Othacehe Date: Fri, 12 Apr 2019 15:15:53 +0200 Message-Id: <20190412131556.25282-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190412131556.25282-1-m.othacehe@gmail.com> References: <20190412131556.25282-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Fri, 12 Apr 2019 09:25:07 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Othacehe Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/installer.scm (build-compiled-file): Use native glibc-utf8-locales. * gnu/services/base.scm (guix-shepherd-service): Ditto, (guix-publish-shepherd-service): ditto. * guix/profiles.scm (profile-derivation): Ditto. * guix/self.scm (guix-command): Ditto. * gnu/packages/package-management.scm (guix)[inputs]: Move glibc-utf8-locales from here ..., [native-inputs]: ... to here, [phases]: search for glibc-utf8-locales in native-inputs and inputs in 'wrap-program phase. --- gnu/installer.scm | 4 ++-- gnu/packages/package-management.scm | 16 ++++++++++------ gnu/services/base.scm | 6 +++--- guix/profiles.scm | 3 ++- guix/self.scm | 3 ++- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 50e2e7d85e..bbf2441061 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Mathieu Othacehe +;;; Copyright © 2018, 2019 Mathieu Othacehe ;;; Copyright © 2019 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. @@ -62,7 +62,7 @@ version of this file." (define set-utf8-locale #~(begin (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" + #+(file-append glibc-utf8-locales "/lib/locale/" (version-major+minor (package-version glibc-utf8-locales)))) (setlocale LC_ALL "en_US.utf8"))) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 4808687227..6720cac783 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2019 Vagrant Cascadian +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -217,7 +218,10 @@ (setenv "SHELL" (which "sh")) #t)) (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key + inputs native-inputs + outputs + #:allow-other-keys) ;; Make sure the 'guix' command finds GnuTLS, ;; Guile-JSON, and Guile-Git automatically. (let* ((out (assoc-ref outputs "out")) @@ -230,7 +234,8 @@ "guile-bytestructures")) (ssh (assoc-ref inputs "guile-ssh")) (gnutls (assoc-ref inputs "gnutls")) - (locales (assoc-ref inputs "glibc-utf8-locales")) + (locales (assoc-ref (or native-inputs inputs) + "glibc-utf8-locales")) (deps (list gcrypt json sqlite gnutls git bs ssh)) (effective @@ -258,7 +263,8 @@ `("GUIX_LOCPATH" ":" suffix (,locpath))) #t)))))) - (native-inputs `(("pkg-config" ,pkg-config) + (native-inputs `(("glibc-utf8-locales" ,glibc-utf8-locales) + ("pkg-config" ,pkg-config) ;; XXX: Keep the development inputs here even though ;; they're unnecessary, just so that 'guix environment @@ -288,9 +294,7 @@ ,@(if (and (not (%current-target-system)) (string=? (%current-system) "x86_64-linux")) `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux"))) - '()) - - ("glibc-utf8-locales" ,glibc-utf8-locales))) + '()))) (propagated-inputs `(("gnutls" ,gnutls) ("guile-gcrypt" ,guile-gcrypt) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 65f7ff29c8..760d65e5ca 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Ricardo Wurmus -;;; Copyright © 2018 Mathieu Othacehe +;;; Copyright © 2018, 2019 Mathieu Othacehe ;;; Copyright © 2019 Efraim Flashner ;;; ;;; This file is part of GNU Guix. @@ -1638,7 +1638,7 @@ archive' public keys, with GUIX." ;; file names such as 'nss-certs'. See ;; . (string-append "GUIX_LOCPATH=" - #$glibc-utf8-locales "/lib/locale") + #+glibc-utf8-locales "/lib/locale") "LC_ALL=en_US.utf8") #:log-file #$log-file)) @@ -1774,7 +1774,7 @@ archive' public keys, with GUIX." ;; as 'nss-certs'. See . #:environment-variables (list (string-append "GUIX_LOCPATH=" - #$glibc-utf8-locales "/lib/locale") + #+glibc-utf8-locales "/lib/locale") "LC_ALL=en_US.utf8"))) (stop #~(make-kill-destructor))))))) diff --git a/guix/profiles.scm b/guix/profiles.scm index dfc9ba1ca0..252910d0e5 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2017 Huang Ying ;;; Copyright © 2017 Maxim Cournoyer +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -1477,7 +1478,7 @@ are cross-built for TARGET." ;; install a UTF-8 locale. #~(begin (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" + #+(file-append glibc-utf8-locales "/lib/locale/" (version-major+minor (package-version glibc-utf8-locales)))) (setlocale LC_ALL "en_US.utf8"))) diff --git a/guix/self.scm b/guix/self.scm index 7ba2764eb9..dc0aba8987 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -421,7 +422,7 @@ load path." (string-append (if locpath (string-append locpath ":") "") - #$(file-append glibc-utf8-locales + #+(file-append glibc-utf8-locales "/lib/locale")))) (let ((guix-main (module-ref (resolve-interface '(guix ui))