aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/locale.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-07-17 23:38:23 +0200
committerLudovic Courtès <ludo@gnu.org>2017-07-17 23:41:36 +0200
commitb19a49d015070f9109c157bc39b47574a8dad481 (patch)
treeae405fa6d9aa41c7bdc75cf34f650bd783eeaab1 /gnu/system/locale.scm
parent6d833b13b77f6b4fb76acab932fd9cec601b71ac (diff)
downloadpatches-b19a49d015070f9109c157bc39b47574a8dad481.tar
patches-b19a49d015070f9109c157bc39b47574a8dad481.tar.gz
locale: Demonadify the locale creation API.
* gnu/system/locale.scm (single-locale-directory): Use 'computed-file' instead of 'gexp->derivation'. (locale-directory): Adjust accordingly and do the same. * gnu/system.scm (operating-system-directory-base-entries): Adjust accordingly.
Diffstat (limited to 'gnu/system/locale.scm')
-rw-r--r--gnu/system/locale.scm26
1 files changed, 11 insertions, 15 deletions
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 2ee834d9fd..75cb855b59 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -19,7 +19,6 @@
(define-module (gnu system locale)
#:use-module (guix gexp)
#:use-module (guix store)
- #:use-module (guix monads)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (gnu packages base)
@@ -118,8 +117,7 @@ of LIBC."
(and #$@(map (cut localedef-command <> #:libc libc)
locales)))))
- (gexp->derivation (string-append "locale-" version) build
- #:local-build? #t))
+ (computed-file (string-append "locale-" version) build))
(define* (locale-directory locales
#:key (libcs %default-locale-libcs))
@@ -133,18 +131,16 @@ data format changes between libc versions."
((libc)
(single-locale-directory locales #:libc libc))
((libcs ..1)
- (mlet %store-monad ((dirs (mapm %store-monad
- (lambda (libc)
- (single-locale-directory locales
- #:libc libc))
- libcs)))
- (gexp->derivation "locale-multiple-versions"
- (with-imported-modules '((guix build union))
- #~(begin
- (use-modules (guix build union))
- (union-build #$output (list #$@dirs))))
- #:local-build? #t
- #:substitutable? #f)))))
+ (let ((dirs (map (lambda (libc)
+ (single-locale-directory locales #:libc libc))
+ libcs)))
+ (computed-file "locale-multiple-versions"
+ (with-imported-modules '((guix build union))
+ #~(begin
+ (use-modules (guix build union))
+ (union-build #$output (list #$@dirs))))
+ #:options '(#:local-build? #t
+ #:substitutable? #f))))))
(define %default-locale-libcs
;; The libcs for which we build locales by default.