unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 35244@debbugs.gnu.org
Cc: Mathieu Othacehe <m.othacehe@gmail.com>
Subject: [bug#35244] [PATCH 3/6] gnu: glibc-utf8-locales: Always use native package.
Date: Fri, 12 Apr 2019 15:15:53 +0200	[thread overview]
Message-ID: <20190412131556.25282-3-m.othacehe@gmail.com> (raw)
In-Reply-To: <20190412131556.25282-1-m.othacehe@gmail.com>

* 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 <m.othacehe@gmail.com>
+;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; 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 <bavier@member.fsf.org>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; 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 <leo@famulari.name>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1638,7 +1638,7 @@ archive' public keys, with GUIX."
                      ;; file names such as 'nss-certs'.  See
                      ;; <https://bugs.gnu.org/32942>.
                      (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 <https://bugs.gnu.org/26948>.
                       #: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 <cmmarusich@gmail.com>
 ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
 ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; 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 <ludo@gnu.org>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; 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))
-- 
2.17.1

  parent reply	other threads:[~2019-04-12 13:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 13:13 [bug#35244] [PATCH 0/6] Fix some cross-compilation issues Mathieu Othacehe
2019-04-12 13:15 ` [bug#35244] [PATCH 1/6] gnu: bash-completion: Fix cross-compilation Mathieu Othacehe
2019-04-12 13:15   ` [bug#35244] [PATCH 2/6] gnu: groff: Fix cross compilation Mathieu Othacehe
2019-04-14 15:22     ` Ludovic Courtès
2019-04-12 13:15   ` Mathieu Othacehe [this message]
2019-04-14 15:24     ` [bug#35244] [PATCH 3/6] gnu: glibc-utf8-locales: Always use native package Ludovic Courtès
2019-04-12 13:15   ` [bug#35244] [PATCH 4/6] gnu: firmware: Fix cross compilation Mathieu Othacehe
2019-04-14 15:26     ` Ludovic Courtès
2019-04-12 13:15   ` [bug#35244] [PATCH 5/6] linux-initrd: " Mathieu Othacehe
2019-04-14 15:29     ` Ludovic Courtès
2019-06-25 19:47       ` Mathieu Othacehe
2019-06-26  8:57         ` Ludovic Courtès
2019-04-12 13:15   ` [bug#35244] [PATCH 6/6] gnu: python: " Mathieu Othacehe
2019-04-14 15:27     ` Ludovic Courtès
2019-04-14 15:19   ` [bug#35244] [PATCH 1/6] gnu: bash-completion: Fix cross-compilation Ludovic Courtès
2019-06-25 19:42     ` Mathieu Othacehe
2019-06-26  8:19 ` [bug#35244] [PATCH] gnu: perl: " 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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190412131556.25282-3-m.othacehe@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=35244@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).