diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-05-10 22:29:10 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-05-15 16:36:21 +0200 |
commit | 9fcfe30d283cd7d36c6e292ea1235eb24307b003 (patch) | |
tree | 8e1199097f7f7e285d8d41f17d89c0b1cf6d175b /gnu/system.scm | |
parent | 3f9bed04f031a4d4f8d3b6dc0a4de42b0c628496 (diff) | |
download | guix-9fcfe30d283cd7d36c6e292ea1235eb24307b003.tar.gz |
system: Add 'operating-system-with-gc-roots'.
* gnu/tests/install.scm (operating-system-with-gc-roots): Move to... * gnu/system.scm (operating-system-with-gc-roots): ... here. New procedure.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 2c4ca55ffc..01be1243fe 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -109,6 +109,7 @@ operating-system-boot-script system-linux-image-file-name + operating-system-with-gc-roots boot-parameters boot-parameters? @@ -519,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. |