From aee6180c10ab0c63430b7589167bf9e5846e6919 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 11 Feb 2015 11:19:29 +0100 Subject: gnu: Add glibc-locales. * gnu/packages/patches/glibc-locales.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc-locales): New variable. --- gnu/packages/base.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index be33cb2caf..554e848369 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -33,6 +33,7 @@ (define-module (gnu packages base) #:use-module (gnu packages linux) #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) + #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -520,6 +521,40 @@ (define-public glibc (license lgpl2.0+) (home-page "http://www.gnu.org/software/libc/"))) +(define-public glibc-locales + (package + (inherit glibc) + (name "glibc-locales") + (source (origin (inherit (package-source glibc)) + (patches (cons (search-patch "glibc-locales.patch") + (origin-patches (package-source glibc)))))) + (synopsis "All the locales supported by the GNU C Library") + (description + "This package provides all the locales supported by the GNU C Library, +more than 400 in total. To use them set the 'LOCPATH' environment variable to +the 'share/locale' sub-directory of this package.") + (outputs '("out")) ;110+ MiB + (arguments + (let ((args `(#:tests? #f #:strip-binaries? #f + ,@(package-arguments glibc)))) + (substitute-keyword-arguments args + ((#:phases phases) + `(alist-replace + 'build + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Delete $out/bin, which contains 'bash'. + (delete-file-recursively (string-append out "/bin"))) + + (zero? (system* "make" "localedata/install-locales" + "-j" (number->string (parallel-job-count))))) + (alist-delete 'install ,phases))) + ((#:configure-flags flags) + `(append ,flags + (list (string-append "libc_cv_localedir=" + (assoc-ref %outputs "out") + "/share/locale"))))))))) + (define-public tzdata (package (name "tzdata") -- cgit v1.2.3