guix/gnu/system/examples/devel-hurd.tmpl
Janneke Nieuwenhuizen bd785af995
system: examples: Add devel-hurd64.tmpl.
This also updates comments and removes the comment about a very old
`bootstrap-profile' hack.

* gnu/system/examples/devel-hurd.tmpl (hurd-packages): New variable
(%hurd-devel-os): Use it.
* gnu/system/examples/devel-hurd64.tmpl: New file.

Change-Id: I54b6b0843f0dd635d89cca483ae43d23b20d21e8
2024-12-03 08:39:01 +01:00

92 lines
2.8 KiB
Scheme

;; -*-scheme-*-
;; This is an operating system configuration template for a "bare bones
;; development" setup, with no X11 display server.
;; To build a disk image for a virtual machine, do something like:
;;
;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
;; --no-offload gnu/system/examples/devel-hurd.tmpl
;;
;; You may run it like so
;;
;; cp /gnu/store/.../disk-image devel-hurd.img
;; guix shell qemu -- qemu-system-i386 -m 4096 \
;; --enable-kvm \
;; --device e1000,netdev=net0 \
;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
;; --hda devel-hurd.img
;;
;; ssh -p 10022 root@localhost
;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
;;
;; or even:
;;
;; guix build hello
;;
;; For Guix hacking, do something like:
;;
;; guix shell --boostrap -D guix
;; mkdir -p ~/src/guix
;; cd src/guix
;; git clone https://git.savannah.gnu.org/git/guix.git master
;; cd master
;; ./bootstrap
;; ./configure
;; make
(include "bare-hurd.tmpl")
(use-modules (srfi srfi-1)
(ice-9 match)
(gnu system hurd)
(guix packages)
(guix store))
(use-package-modules base compression file gawk gdb hurd less m4
package-management ssh version-control)
(define (input->package input)
"Return the INPUT as package, or #f."
(match input
((label (and (? package?) package))
package)
((label (and (? package?) package . output))
(cons package output))
(_ #f)))
(define guix-packages
(filter-map input->package
(fold alist-delete (package-direct-inputs guix)
;; These are not essential and do not build yet.
'("graphviz" "guile-avahi" "po4a"))))
(define hurd-packages
(filter-map input->package
(fold alist-delete (package-direct-inputs hurd)
;; These are not essential, rumpkernel is very big.
'("dde-sources" "parted" "rumpkernel" "util-linux"
"texinfo"))))
(define %hurd-devel-os
(operating-system
(inherit %hurd-os)
(bootloader (bootloader-configuration
(bootloader grub-minimal-bootloader)
(targets '("/dev/sdX"))
(timeout 0)))
(timezone "Europe/Berlin")
(swap-devices (list (swap-space
(target "/swapfile"))))
(packages (cons*
gdb-minimal
git-minimal
gnu-make
m4
openssh-sans-x
(append
guix-packages
hurd-packages
%base-packages/hurd)))))
%hurd-devel-os