aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/locale.scm10
-rw-r--r--gnu/system/shadow.scm12
2 files changed, 14 insertions, 8 deletions
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 75cb855b59..75417f6698 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
#:use-module (guix store)
#:use-module (guix records)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (srfi srfi-26)
@@ -90,9 +92,9 @@ or #f on failure."
"--no-archive" "--prefix" #$output
"-i" #$(locale-definition-source locale)
"-f" #$(locale-definition-charset locale)
- (string-append #$output "/"
- #$(package-version libc) "/"
- #$(locale-definition-name locale))))))
+ (string-append #$output "/" #$(version-major+minor
+ (package-version libc))
+ "/" #$(locale-definition-name locale))))))
(define* (single-locale-directory locales
#:key (libc (canonical-package glibc)))
@@ -102,7 +104,7 @@ Because locale data formats are incompatible when switching from one libc to
another, locale data is put in a sub-directory named after the 'version' field
of LIBC."
(define version
- (package-version libc))
+ (version-major+minor (package-version libc)))
(define build
#~(begin
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 2b8412cdd5..119f7e4d0b 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -197,10 +197,14 @@ set auto-load safe-path /gnu/store/*/lib\n")))
(".zlogin" ,zlogin)
(".Xdefaults" ,xdefaults)
(".guile" ,(plain-file "dot-guile"
- (string-append
- "(use-modules (ice-9 readline))\n\n"
- ";; Enable completion at the REPL.\n"
- "(activate-readline)\n")))
+ "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
+ =>
+ (lambda (module)
+ ;; Enable completion and input history at the REPL.
+ ((module-ref module 'activate-readline))))
+ (else
+ (display \"Consider installing the 'guile-readline' package for
+convenient interactive line editing and input history.\\n\\n\")))\n"))
(".guile-wm" ,guile-wm)
(".gdbinit" ,gdbinit))))