[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
27/44: system: hurd: Create system profile for guix development.
From: |
guix-commits |
Subject: |
27/44: system: hurd: Create system profile for guix development. |
Date: |
Tue, 21 Apr 2020 15:48:25 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 3333460832dca06217523fde0f7d3557d652c418
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 bd08125..f3360f2 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)
@@ -102,6 +112,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))
@@ -200,7 +229,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)
@@ -216,7 +245,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))
@@ -271,15 +300,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")
@@ -363,3 +392,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/44: gnu: hurd: Build DDE libraries., (continued)
- 06/44: gnu: hurd: Build DDE libraries., guix-commits, 2020/04/21
- 10/44: gnu: Add netdde., guix-commits, 2020/04/21
- 16/44: services: Add hurd-console-service-type., guix-commits, 2020/04/21
- 15/44: services: Add hurd., guix-commits, 2020/04/21
- 14/44: system: hurd: Add /etc/group., guix-commits, 2020/04/21
- 11/44: gnu: hurd: Add NFS support., guix-commits, 2020/04/21
- 18/44: services: Add hurd-user-services-service-type., guix-commits, 2020/04/21
- 22/44: services: Add openssh-service as a Hurd service., guix-commits, 2020/04/21
- 21/44: services: hurd: Add dummy loopback., guix-commits, 2020/04/21
- 19/44: services: Add guix-daemon-service as a Hurd service., guix-commits, 2020/04/21
- 27/44: system: hurd: Create system profile for guix development.,
guix-commits <=
- 25/44: system: gnu: Populate "/etc" from "/boot/activation"., guix-commits, 2020/04/21
- 30/44: gnu: guix: Fix cross-compilation., guix-commits, 2020/04/21
- 34/44: gnu: guix: Add dependency on `hurd' when building for the Hurd., guix-commits, 2020/04/21
- 07/44: gnu: hurd: Fix references to /bin/w., guix-commits, 2020/04/21
- 17/44: services: Add hurd-ttys-service-type., guix-commits, 2020/04/21
- 20/44: services: hurd: Add dummy syslog., guix-commits, 2020/04/21
- 26/44: system: hurd: Add openssh service., guix-commits, 2020/04/21
- 31/44: gnu: guix: Cross-build fixup for wrap-program., guix-commits, 2020/04/21
- 13/44: system: hurd: Add less, which to %base-packages/hurd., guix-commits, 2020/04/21
- 12/44: gnu: Add libtirpc/hurd., guix-commits, 2020/04/21