projects/guix·blob python-team · refs

94 lines · 2.9 KiB

1;; -*-scheme-*-
2
3;; This is an operating system configuration template for a "bare bones
4;; development" setup, with no X11 display server.
5
6;; To build a disk image for a virtual machine, do something like:
7;;
8;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
9;; --no-offload gnu/system/examples/devel-hurd.tmpl
10;;
11;; You may run it like so
12;;
13;; cp /gnu/store/.../disk-image devel-hurd.img
14;; guix shell qemu -- qemu-system-i386 -m 4096 \
15;; --enable-kvm \
16;; --device e1000,netdev=net0 \
17;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
18;; --hda devel-hurd.img
19;;
20;; ssh -p 10022 root@localhost
21;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
22;;
23;; or even:
24;;
25;; guix build hello
26;;
27;; For Guix hacking, do something like:
28;;
29;; guix shell --boostrap -D guix
30;; mkdir -p ~/src/guix
31;; cd src/guix
32;; git clone https://git.guix.gnu.org/guix.git master
33;; cd master
34;; ./bootstrap
35;; ./configure
36;; make
37
38(include "bare-hurd.tmpl")
39
40(use-modules (srfi srfi-1)
41 (ice-9 match)
42 (gnu system hurd)
43 (guix packages)
44 (guix store))
45
46(use-package-modules base compression file gawk gdb hurd less m4
47 package-management ssh version-control)
48
49(define (input->package input)
50 "Return the INPUT as package, or #f."
51 (match input
52 ((label (and (? package?) package))
53 package)
54 ((label (and (? package?) package . output))
55 (cons package output))
56 (_ #f)))
57
58(define guix-packages
59 (filter-map input->package
60 (fold alist-delete (package-direct-inputs guix)
61 ;; These are not essential and do not build yet,
62 '("graphviz" "graphviz-minimal" "guile-avahi" "po4a"
63 ;; or are linux-only.
64 "slirp4netns"))))
65
66(define hurd-packages
67 (filter-map input->package
68 (fold alist-delete (package-direct-inputs hurd)
69 ;; These are not essential, rumpkernel is very big.
70 '("dde-sources" "parted" "rumpkernel" "util-linux"
71 "texinfo"))))
72
73(define %hurd-devel-os
74 (operating-system
75 (inherit %hurd-os)
76 (bootloader (bootloader-configuration
77 (bootloader grub-minimal-bootloader)
78 (targets '("/dev/sdX"))
79 (timeout 0)))
80 (timezone "Europe/Berlin")
81 (swap-devices (list (swap-space
82 (target "/swapfile"))))
83 (packages (cons*
84 gdb-minimal
85 git-minimal
86 gnu-make
87 m4
88 openssh-sans-x
89 (append
90 guix-packages
91 hurd-packages
92 %base-packages/hurd)))))
93
94%hurd-devel-os