mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
e6cd8581c1
commit
59bcffa314
5 changed files with 86 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
# Copyright © 2017 Leo Famulari <leo@famulari.name>
|
# Copyright © 2017 Leo Famulari <leo@famulari.name>
|
||||||
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||||
# Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
# Copyright © 2018 Nikita <nikita@n0.is>
|
# Copyright © 2018 Nikita <nikita@n0.is>
|
||||||
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
||||||
|
@ -348,6 +348,7 @@ AUX_FILES = \
|
||||||
EXAMPLES = \
|
EXAMPLES = \
|
||||||
gnu/system/examples/asus-c201.tmpl \
|
gnu/system/examples/asus-c201.tmpl \
|
||||||
gnu/system/examples/bare-bones.tmpl \
|
gnu/system/examples/bare-bones.tmpl \
|
||||||
|
gnu/system/examples/bare-hurd.tmpl \
|
||||||
gnu/system/examples/beaglebone-black.tmpl \
|
gnu/system/examples/beaglebone-black.tmpl \
|
||||||
gnu/system/examples/desktop.tmpl \
|
gnu/system/examples/desktop.tmpl \
|
||||||
gnu/system/examples/lightweight-desktop.tmpl \
|
gnu/system/examples/lightweight-desktop.tmpl \
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
||||||
|
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -33,6 +34,7 @@ (define-module (gnu services)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages hurd)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
#:use-module (srfi srfi-9 gnu)
|
#:use-module (srfi srfi-9 gnu)
|
||||||
|
|
31
gnu/system/examples/bare-hurd.tmpl
Normal file
31
gnu/system/examples/bare-hurd.tmpl
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
;; -*-scheme-*-
|
||||||
|
|
||||||
|
;; This is an operating system configuration template
|
||||||
|
;; for a "bare bones" setup, with no X11 display server.
|
||||||
|
|
||||||
|
;; To build a disk image for a virtual machine, do
|
||||||
|
;;
|
||||||
|
;; ./pre-inst-env guix system disk-image --target=i586-pc-gnu --no-grafts \
|
||||||
|
;; gnu/system/examples/bare-hurd.tmpl
|
||||||
|
;;
|
||||||
|
;; it boots, but needs activation, more setup and services to be useful.
|
||||||
|
|
||||||
|
(use-modules (gnu) (gnu system hurd) (guix utils))
|
||||||
|
|
||||||
|
(define %hurd-os
|
||||||
|
(operating-system
|
||||||
|
(inherit %hurd-default-operating-system)
|
||||||
|
(bootloader (bootloader-configuration
|
||||||
|
(bootloader grub-minimal-bootloader)
|
||||||
|
(target "/dev/sdX")))
|
||||||
|
(file-systems (cons (file-system
|
||||||
|
(device (file-system-label "my-root"))
|
||||||
|
(mount-point "/")
|
||||||
|
(type "ext2"))
|
||||||
|
%base-file-systems))
|
||||||
|
(host-name "guixygnu")
|
||||||
|
(timezone "Europe/Amsterdam")
|
||||||
|
(packages %base-packages/hurd)
|
||||||
|
(services %base-services/hurd)))
|
||||||
|
|
||||||
|
%hurd-os
|
|
@ -21,6 +21,7 @@ (define-module (gnu system hurd)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix profiles)
|
#:use-module (guix profiles)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu bootloader)
|
||||||
#:use-module (gnu bootloader grub)
|
#:use-module (gnu bootloader grub)
|
||||||
#:use-module (gnu packages admin)
|
#:use-module (gnu packages admin)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
|
@ -31,8 +32,18 @@ (define-module (gnu system hurd)
|
||||||
#:use-module (gnu packages guile-xyz)
|
#:use-module (gnu packages guile-xyz)
|
||||||
#:use-module (gnu packages hurd)
|
#:use-module (gnu packages hurd)
|
||||||
#:use-module (gnu packages less)
|
#: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)
|
#: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:
|
;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -41,10 +52,42 @@ (define-module (gnu system hurd)
|
||||||
;;;
|
;;;
|
||||||
;;; Code:
|
;;; 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
|
(define %base-packages/hurd
|
||||||
(list hurd bash coreutils file findutils grep sed
|
(list hurd bash coreutils file findutils grep sed
|
||||||
guile-3.0 guile-colorized guile-readline
|
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))
|
(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
|
||||||
"Return a cross-built GNU/Hurd image."
|
"Return a cross-built GNU/Hurd image."
|
||||||
|
|
|
@ -307,7 +307,12 @@ guix system search anonym network | grep "^name: tor"
|
||||||
|
|
||||||
# Verify that the examples can be built.
|
# Verify that the examples can be built.
|
||||||
for example in gnu/system/examples/*.tmpl; do
|
for example in gnu/system/examples/*.tmpl; do
|
||||||
guix system -n disk-image "$example"
|
if echo "$example" | grep hurd; then
|
||||||
|
target="--target=i586-pc-gnu"
|
||||||
|
else
|
||||||
|
target=
|
||||||
|
fi
|
||||||
|
guix system -n disk-image $target "$example"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Verify that the disk image types can be built.
|
# Verify that the disk image types can be built.
|
||||||
|
|
Loading…
Reference in a new issue