diff options
author | Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 2020-04-13 17:15:10 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2020-06-08 13:51:19 +0200 |
commit | 59bcffa314171294278444aad4b7012abe50257a (patch) | |
tree | fb3da83f672c4c08d7af60950a47d96cae5d16f7 /gnu/system/hurd.scm | |
parent | e6cd8581c192f739712013874dfa9690522ea9f1 (diff) | |
download | guix-59bcffa314171294278444aad4b7012abe50257a.tar.gz |
system: examples: Add bare-hurd.tmpl.
* gnu/system/hurd.scm (%hurd-def%hurd-default-operating-system-kernel, %hurd-default-operating-system): New exported variables. * gnu/system/examples/bare-hurd.tmpl: New file. * Makefile.am (EXAMPLES): Add it. * tests/guix-system.sh: Add --target=i586-pc-gnu when testing it.
Diffstat (limited to 'gnu/system/hurd.scm')
-rw-r--r-- | gnu/system/hurd.scm | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 3ccf47aa21..e11055cbb8 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -21,6 +21,7 @@ #:use-module (guix gexp) #:use-module (guix profiles) #:use-module (guix utils) + #:use-module (gnu bootloader) #:use-module (gnu bootloader grub) #:use-module (gnu packages admin) #:use-module (gnu packages base) @@ -31,8 +32,18 @@ #:use-module (gnu packages guile-xyz) #:use-module (gnu packages hurd) #:use-module (gnu packages less) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services hurd) + #:use-module (gnu services shepherd) + #:use-module (gnu system) + #:use-module (gnu system shadow) #:use-module (gnu system vm) - #:export (cross-hurd-image)) + #:export (cross-hurd-image + %base-packages/hurd + %base-services/hurd + %hurd-default-operating-system + %hurd-default-operating-system-kernel)) ;;; Commentary: ;;; @@ -41,10 +52,42 @@ ;;; ;;; Code: +(define %hurd-default-operating-system-kernel + (if (hurd-system?) + gnumach + ;; A cross-built GNUmach does not work + (with-parameters ((%current-system "i686-linux") + (%current-target-system #f)) + gnumach))) + (define %base-packages/hurd (list hurd bash coreutils file findutils grep sed guile-3.0 guile-colorized guile-readline - net-base inetutils less which)) + net-base inetutils less shepherd which)) + +(define %base-services/hurd + '()) + +(define %hurd-default-operating-system + (operating-system + (kernel %hurd-default-operating-system-kernel) + (kernel-arguments '()) + (hurd hurd) + (bootloader (bootloader-configuration + (bootloader grub-minimal-bootloader) + (target "/dev/vda"))) + (initrd (lambda _ '())) + (initrd-modules (lambda _ '())) + (firmware '()) + (host-name "guixygnu") + (file-systems '()) + (packages %base-packages/hurd) + (timezone "GNUrope") + (name-service-switch #f) + (essential-services (hurd-default-essential-services this-operating-system)) + (pam-services '()) + (setuid-programs '()) + (sudoers-file #f))) (define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach)) "Return a cross-built GNU/Hurd image." |