[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/47: system: examples: Add devel-hurd.tmpl.
From: |
guix-commits |
Subject: |
08/47: system: examples: Add devel-hurd.tmpl. |
Date: |
Sat, 9 Nov 2024 09:37:49 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 5f07bfc9062e91864c71e54d920c48077da0c7cd
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Fri Jun 5 09:18:35 2020 +0200
system: examples: Add devel-hurd.tmpl.
This operating system specification for the Hurd creates a system that
supports building the guix package from git natively.
Do something like
./pre-inst-env guix system build --target=i586-pc-gnu \
gnu/system/examples/devel-hurd.tmpl
./pre-inst-env guix system image --image-type=hurd-qcow2
--image-size=15G \
--no-offload gnu/system/examples/devel-hurd.tmpl
cp /gnu/store/...disk-image devel.img
guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \
-device rtl8139,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
-hda devel-hurd.img
ssh -p 10022 root@localhost
GUIX_PROFILE=/run/current-system/bootstrap-profile
source $GUIX_PROFILE/etc/profile
mkdir -p ~/src/guix
cd src/guix
git clone git://git.savannah.gnu.org/guix
cd guix
./bootstrap
./configure --with-courage
make
* gnu/system/examples/devel-hurd.tmpl: New file.
Change-Id: I097c7c00a9ab9602db7f8f3305827c815f308d1e
---
gnu/system/examples/devel-hurd.tmpl | 106 ++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
diff --git a/gnu/system/examples/devel-hurd.tmpl
b/gnu/system/examples/devel-hurd.tmpl
new file mode 100644
index 0000000000..3dca0706d1
--- /dev/null
+++ b/gnu/system/examples/devel-hurd.tmpl
@@ -0,0 +1,106 @@
+;; -*-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
+;;
+;; ./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 -enable-kvm -m 4096 \
+;; -device rtl8139,netdev=net0 \
+;; -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
+;; -hda devel-hurd.img
+;;
+;; and use it like
+;;
+;; ssh -p 10022 root@localhost
+;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
+;;
+;; or even (if you use --image-size=3G)
+;;
+;; guix build hello
+;;
+;; Building Guix, do something like:
+;;
+;; GUIX_PROFILE=/run/current-system/bootstrap-profile
+;; source $GUIX_PROFILE/etc/profile
+;; mkdir -p ~/src/guix
+;; cd src/guix
+;; git clone https://git.savannah.gnu.org/git/guix.git master
+;; cd master
+;; ./bootstrap
+;; ./configure --with-courage
+;; make
+
+(use-modules (srfi srfi-1)
+ (ice-9 match)
+ (gnu)
+ (gnu system hurd)
+ (gnu system locale)
+ (guix packages)
+ (guix store)
+ (guix utils))
+(use-service-modules ssh virtualization)
+(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-devel-os
+ (operating-system
+ (inherit %hurd-vm-operating-system)
+ (host-name "guixydevel")
+ (timezone "Europe/Berlin")
+ (file-systems (cons (file-system
+ (device (file-system-label "hurd"))
+ (mount-point "/")
+ (type "ext2"))
+ %base-file-systems))
+ (swap-devices (list (swap-space
+ (target "/swapfile"))))
+ (users (cons (user-account
+ (name "guix")
+ (group "users")
+ (supplementary-groups '("wheel")))
+ %base-user-accounts))
+ (packages (cons*
+ gdb-minimal
+ git-minimal
+ gnu-make
+ m4
+ openssh-sans-x
+ (append
+ guix-packages
+ %base-packages/hurd)))
+ (services (cons*
+ (modify-services (operating-system-user-services
+ %hurd-vm-operating-system)
+ (openssh-service-type
+ config =>
+ ;; Set wide open
+ (openssh-configuration
+ (openssh openssh-sans-x)
+ (port-number 2222)
+ (permit-root-login #t)
+ (allow-empty-passwords? #t)
+ (password-authentication? #t))))))))
+
+%hurd-devel-os
- 22/47: gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd., (continued)
- 22/47: gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd., guix-commits, 2024/11/09
- 27/47: gnu: patch: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 25/47: gnu: elfutils: Fix build for 64bit Hurd., guix-commits, 2024/11/09
- 10/47: installer: Remove unused (newt) imports., guix-commits, 2024/11/09
- 13/47: installer: Fix file-name typos., guix-commits, 2024/11/09
- 26/47: gnu: grep: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 30/47: gnu: gcc-13, gcc-14: Support being used as parent for gcc-static., guix-commits, 2024/11/09
- 29/47: gnu: libstdc++: Support the 64bit Hurd., guix-commits, 2024/11/09
- 46/47: gnu: grub: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 45/47: gnu: inetutils: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 08/47: system: examples: Add devel-hurd.tmpl.,
guix-commits <=
- 12/47: installer: Use "partitioning-page" consistently., guix-commits, 2024/11/09
- 14/47: installer: Use `%' for parameter %run-command-in-installer., guix-commits, 2024/11/09
- 19/47: gnu: gnumach: Update to v1.8+git20240406., guix-commits, 2024/11/09
- 21/47: gnu: gcc: Add indirections current-gcc, current-gcc-toolchain., guix-commits, 2024/11/09
- 15/47: installer: Add dry-run?, guix-commits, 2024/11/09
- 16/47: installer: Add "Kernel" page to select the Hurd., guix-commits, 2024/11/09
- 20/47: gnu: hurd: Update to v0.9.git20240714., guix-commits, 2024/11/09
- 23/47: gnu: cross-libc: Support cross-building for the 64bit Hurd., guix-commits, 2024/11/09
- 24/47: gnu: bash-minimal: Fix build for 64bit Hurd., guix-commits, 2024/11/09
- 28/47: gnu: libxcrypt: Support the 64bit Hurd., guix-commits, 2024/11/09