aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-11 11:19:29 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-11 11:19:29 +0100
commitaee6180c10ab0c63430b7589167bf9e5846e6919 (patch)
tree38563749fdb8de834b7332b24c4f0081191365c2 /gnu/packages/base.scm
parentfbe952c99f5ab8d6001984d4b74469e48178d4c7 (diff)
downloadguix-aee6180c10ab0c63430b7589167bf9e5846e6919.tar
guix-aee6180c10ab0c63430b7589167bf9e5846e6919.tar.gz
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.
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm35
1 files changed, 35 insertions, 0 deletions
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 @@
#: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 @@ with the Linux kernel.")
(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")