aboutsummaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-04-17 00:08:34 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-04-17 00:08:34 +0200
commitf5961dd5854cec1ed9a41365836d63aa15256642 (patch)
tree9e6168827adf5e4e90128d55fad6f0ab6448c86a /gnu/system.scm
parent05bb85fda06dc361b8d3d1eef0759606784b3130 (diff)
parente28ff04108ae7506a21d451cc23d63937076e2a3 (diff)
downloadpatches-f5961dd5854cec1ed9a41365836d63aa15256642.tar
patches-f5961dd5854cec1ed9a41365836d63aa15256642.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index ad0c9e57dc..24243eb707 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -78,6 +78,8 @@
operating-system-kernel
operating-system-kernel-file
operating-system-kernel-arguments
+ operating-system-label
+ operating-system-default-label
operating-system-initrd-modules
operating-system-initrd
operating-system-users
@@ -160,6 +162,9 @@
(kernel-arguments operating-system-user-kernel-arguments
(default '())) ; list of gexps/strings
(bootloader operating-system-bootloader) ; <bootloader-configuration>
+ (label operating-system-label ; string
+ (thunked)
+ (default (operating-system-default-label this-operating-system)))
(keyboard-layout operating-system-keyboard-layout ;#f | <keyboard-layout>
(default #f))
@@ -911,15 +916,18 @@ listed in OS. The C library expects to find it under
(cond ((package? kernel)
(string-append "GNU with "
(string-titlecase (package-name kernel)) " "
- (package-version kernel)
- " (beta)"))
+ (package-version kernel)))
((inferior-package? kernel)
(string-append "GNU with "
(string-titlecase (inferior-package-name kernel)) " "
- (inferior-package-version kernel)
- " (beta)"))
+ (inferior-package-version kernel)))
(else "GNU")))
+(define (operating-system-default-label os)
+ "Return the default label for OS, as it will appear in the bootloader menu
+entry."
+ (kernel->boot-label (operating-system-kernel os)))
+
(define (store-file-system file-systems)
"Return the file system object among FILE-SYSTEMS that contains the store."
(match (filter (lambda (fs)
@@ -968,7 +976,7 @@ such as '--root' and '--load' to <boot-parameters>."
(bootloader (bootloader-configuration-bootloader
(operating-system-bootloader os)))
(bootloader-name (bootloader-name bootloader))
- (label (kernel->boot-label (operating-system-kernel os))))
+ (label (operating-system-label os)))
(boot-parameters
(label label)
(root-device root-device)