aboutsummaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
commit57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch)
tree76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /gnu/system.scm
parent43d9ed7792808638eabb43aa6133f1d6186c520b (diff)
parent136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff)
downloadpatches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar
patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm18
1 files changed, 16 insertions, 2 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 0489b9720d..01be1243fe 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -72,6 +72,7 @@
operating-system-bootloader
operating-system-services
operating-system-essential-services
+ operating-system-default-essential-services
operating-system-user-services
operating-system-packages
operating-system-host-name
@@ -108,6 +109,7 @@
operating-system-boot-script
system-linux-image-file-name
+ operating-system-with-gc-roots
boot-parameters
boot-parameters?
@@ -213,7 +215,8 @@
(essential-services operating-system-essential-services ; list of services
(thunked)
- (default (essential-services this-operating-system)))
+ (default (operating-system-default-essential-services
+ this-operating-system)))
(services operating-system-user-services ; list of services
(default %base-services))
@@ -463,7 +466,7 @@ value of the SYSTEM-SERVICE-TYPE service."
("initrd" ,initrd)
("locale" ,locale)))))) ;used by libc
-(define* (essential-services os)
+(define (operating-system-default-essential-services os)
"Return the list of essential services for OS. These are special services
that implement part of what's declared in OS are responsible for low-level
bookkeeping."
@@ -517,6 +520,17 @@ bookkeeping."
(append (operating-system-user-services os)
(operating-system-essential-services os))))
+(define (operating-system-with-gc-roots os roots)
+ "Return a variant of OS where ROOTS are registered as GC roots."
+ (operating-system
+ (inherit os)
+
+ ;; We use this procedure for the installation OS, which already defines GC
+ ;; roots. Add ROOTS to those.
+ (services (cons (simple-service 'extra-root
+ gc-root-service-type roots)
+ (operating-system-user-services os)))))
+
;;;
;;; /etc.