summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm32
1 files changed, 23 insertions, 9 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 9540324df0..d600d3a293 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -362,6 +362,7 @@ explicitly appear in OS."
;; many people are familiar with, so keep it around.
iw wireless-tools
+ iproute
net-tools ; XXX: remove when Inetutils suffices
man-db
texinfo ;for the standalone Info reader
@@ -669,18 +670,31 @@ hardware-related operations as necessary when booting a Linux container."
#:mapped-devices mapped-devices)))
(return #~(string-append #$initrd "/initrd"))))
+(define (locale-name->definition* name)
+ "Variant of 'locale-name->definition' that raises an error upon failure."
+ (match (locale-name->definition name)
+ (#f
+ (raise (condition
+ (&message
+ (message (format #f (_ "~a: invalid locale name") name))))))
+ (def def)))
+
(define (operating-system-locale-directory os)
"Return the directory containing the locales compiled for the definitions
listed in OS. The C library expects to find it under
/run/current-system/locale."
- ;; While we're at it, check whether the locale of OS is defined.
- (unless (member (operating-system-locale os)
- (map locale-definition-name
- (operating-system-locale-definitions os)))
- (raise (condition
- (&message (message "system locale lacks a definition")))))
-
- (locale-directory (operating-system-locale-definitions os)
+ (define name
+ (operating-system-locale os))
+
+ (define definitions
+ ;; While we're at it, check whether NAME is defined and add it if needed.
+ (if (member name (map locale-definition-name
+ (operating-system-locale-definitions os)))
+ (operating-system-locale-definitions os)
+ (cons (locale-name->definition* name)
+ (operating-system-locale-definitions os))))
+
+ (locale-directory definitions
#:libcs (operating-system-locale-libcs os)))
(define (kernel->grub-label kernel)