[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
28/48: system: hurd: Create system profile for guix development.
From: |
guix-commits |
Subject: |
28/48: system: hurd: Create system profile for guix development. |
Date: |
Sun, 19 Apr 2020 10:22:14 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 750529549b7f427055da66e64e7ca5dab08f5d21
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Fri Apr 17 07:51:14 2020 +0200
system: hurd: Create system profile for guix development.
Doing
guix build -f gnu/system/hurd.scm
now produces a VM with a system profile that includes the minimal
requirements
to do guix development from git.
* gnu/system/hurd.scm (%hurd-os-development): New variable that includes
git-minimal and guix build dependencies.
(cross-hurd-image): Add new keyword parameter `os'; use it instead of global
%hurd-os and use %base-packages/hurd via os.
Return thunk for development.
---
gnu/system/hurd.scm | 42 +++++++++++++++++++++++++++++++++++++-----
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 1bf8066..5b03cdd 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -19,20 +19,30 @@
(define-module (gnu system hurd)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:use-module (ice-9 match)
+ #:use-module (guix build-system gnu)
#:use-module (guix gexp)
+ #:use-module (guix packages)
#:use-module (guix profiles)
#:use-module (guix utils)
#:use-module (gnu bootloader grub)
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages commencement)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages cross-base)
#:use-module (gnu packages file)
+ #:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages hurd)
#:use-module (gnu packages less)
+ #:use-module (gnu packages m4)
#:use-module (gnu packages ssh)
+ #:use-module (gnu packages version-control)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu services hurd)
@@ -108,6 +118,25 @@
(pam-services '())
(setuid-programs '())))
+(define (input->packages input)
+ "Return the list of packages in INPUT."
+ (match input
+ ((label (and (? package?) package) . output)
+ (list package))
+ (_ '())))
+
+(define %hurd-os-development
+ (operating-system
+ (inherit %hurd-os)
+ (packages
+ (append
+ (list git-minimal)
+ (append-map input->packages
+ (fold alist-delete (package-direct-inputs guix)
+ '("graphviz" "po4a")))
+ (list gawk diffutils gnu-make m4 tar xz)
+ %base-packages/hurd))))
+
(define operating-system-accounts
(@@ (gnu system) operating-system-accounts))
@@ -206,7 +235,7 @@ fi\n")))
(scheme-file "shepherd.conf" config)))
-(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
+(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach) (os %hurd-os))
"Return a cross-built GNU/Hurd image."
(define (cross-built thing)
@@ -222,7 +251,7 @@ fi\n")))
(define system-profile
(map-manifest-entries cross-built-entry
- (packages->manifest %base-packages/hurd)))
+ (packages->manifest (operating-system-packages os))))
(define grub.cfg
(let ((hurd (cross-built hurd))
@@ -277,15 +306,15 @@ sshd:x:2:2:sshd:/var/empty:/bin/no-sh
;; XXX This still gives 64bit .go files
;; (define shepherd.conf
;; (with-parameters ((%current-target-system "i586-pc-gnu"))
- ;; (shepherd-configuration-file (hurd-shepherd-services %hurd-os))))
+ ;; (shepherd-configuration-file (hurd-shepherd-services os))))
(define shepherd.conf
(with-parameters ((%current-target-system "i586-pc-gnu"))
- (hurd-shepherd-configuration-file (hurd-shepherd-services %hurd-os))))
+ (hurd-shepherd-configuration-file (hurd-shepherd-services os))))
(define boot-activation
(with-parameters ((%current-target-system "i586-pc-gnu"))
- (operating-system-activation-script %hurd-os)))
+ (operating-system-activation-script os)))
(define hurd-directives
`((directory "/servers")
@@ -369,3 +398,6 @@ sshd:x:2:2:sshd:/var/empty:/bin/no-sh
;; Return this thunk so one can type "guix build -f gnu/system/hurd.scm".
cross-hurd-image
+
+;; Return the development thunk so "guix build -f gnu/system/hurd.scm"
+(lambda _ (cross-hurd-image #:os %hurd-os-development))
- 06/48: syscalls: 'readdir*' chooses between the Linux and Hurd code at run time., (continued)
- 06/48: syscalls: 'readdir*' chooses between the Linux and Hurd code at run time., guix-commits, 2020/04/19
- 08/48: gnu: hurd: Fix references to /bin/w., guix-commits, 2020/04/19
- 11/48: gnu: Add dde-sources., guix-commits, 2020/04/19
- 13/48: gnu: hurd: Add NFS support., guix-commits, 2020/04/19
- 12/48: gnu: Add netdde., guix-commits, 2020/04/19
- 17/48: services: Add hurd-ttys-service-type., guix-commits, 2020/04/19
- 18/48: services: Add hurd-user-services-service-type., guix-commits, 2020/04/19
- 22/48: services: Add openssh-service as a Hurd service., guix-commits, 2020/04/19
- 15/48: services: Add hurd., guix-commits, 2020/04/19
- 14/48: gnu: Add libtirpc/hurd., guix-commits, 2020/04/19
- 28/48: system: hurd: Create system profile for guix development.,
guix-commits <=
- 21/48: services: hurd: Add dummy loopback., guix-commits, 2020/04/19
- 25/48: system: gnu: Populate "/etc" from "/boot/activation"., guix-commits, 2020/04/19
- 19/48: services: Add guix-daemon-service as a Hurd service., guix-commits, 2020/04/19
- 29/48: system: gnu: Add %bootstrap-{gcc, binutils, glibc} for devel profile., guix-commits, 2020/04/19
- 30/48: guile: Disable web-server test on the Hurd., guix-commits, 2020/04/19
- 31/48: gnu: tar: Disable troublesome tests on the Hurd., guix-commits, 2020/04/19
- 32/48: gnu: tls: Remove datefudge and disable tests on the Hurd., guix-commits, 2020/04/19
- 20/48: services: hurd: Add dummy syslog., guix-commits, 2020/04/19
- 35/48: HACK gnu: python: Disable tests on the Hurd., guix-commits, 2020/04/19
- 36/48: system: hurd: Add guix., guix-commits, 2020/04/19