summaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-03-05 18:38:05 +0100
committerLudovic Courtès <ludo@gnu.org>2013-03-05 18:38:05 +0100
commit7f614e49e877cbf3e909ed74b3e6822dc39eabe5 (patch)
tree91a1cdd59b7c87c322f778d11fb525d192a986ba /gnu/packages/base.scm
parent81eec00cb221231123b74d14245ef7caa9d89ff6 (diff)
gnu: glibc: Install locale data.
* gnu/packages/base.scm (glibc): Add `outputs' field. Pass `--localedir' and set `libc_cv_localedir'. Add `install-locales' phase.
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm24
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5aeb050863..537bd5af6d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -508,13 +508,28 @@ used in the GNU system including the GNU/Linux variant.")
;; users should automatically pull Linux headers as well.
(propagated-inputs `(("linux-headers" ,linux-libre-headers)))
+ ;; Store the locales separately (~100 MiB). Note that "out" retains a
+ ;; reference to them anyway, so there's no space savings here.
+ ;; TODO: Eventually we may want to add a $LOCALE_ARCHIVE search path like
+ ;; Nixpkgs does.
+ (outputs '("out" "locales"))
+
(arguments
`(#:out-of-source? #t
#:patches (list (assoc-ref %build-inputs "patch/ld.so.cache"))
#:configure-flags
(list "--enable-add-ons"
"--sysconfdir=/etc"
- "--localedir=/var/run/current-system/sw/lib/locale" ; XXX
+ (string-append "--localedir=" (assoc-ref %outputs "locales")
+ "/share/locale")
+
+ ;; `--localedir' is not honored, so work around it.
+ ;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>.
+ (string-append "libc_cv_localedir="
+ (assoc-ref %outputs "locales")
+ "/share/locale")
+
+
(string-append "--with-headers="
(assoc-ref %build-inputs "linux-headers")
"/include")
@@ -580,7 +595,12 @@ used in the GNU system including the GNU/Linux variant.")
(substitute* "libio/iopopen.c"
(("/bin/sh")
(string-append out "/bin/bash")))))
- %standard-phases)))
+ (alist-cons-after
+ 'install 'install-locales
+ (lambda _
+ (zero? (system* "make" "localedata/install-locales")))
+ %standard-phases))))
+
(inputs `(("patch/ld.so.cache"
,(search-patch "glibc-no-ld-so-cache.patch"))
("static-bash" ,(static-package bash-light))))