[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
27/43: system: hurd: Create system profile for guix development.
From: |
guix-commits |
Subject: |
27/43: system: hurd: Create system profile for guix development. |
Date: |
Mon, 20 Apr 2020 07:34:08 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit fa25252cd88e28b5e5807c72512ac2a74012ecb8
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 f2269a8..7799689 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))
- 24/43: HACK use uncompiled .scm for shepherd, (continued)
- 24/43: HACK use uncompiled .scm for shepherd, guix-commits, 2020/04/20
- 28/43: system: gnu: Add %bootstrap-{gcc, binutils, glibc} for devel profile., guix-commits, 2020/04/20
- 26/43: system: hurd: Add openssh service., guix-commits, 2020/04/20
- 32/43: system: hurd: Add guix., guix-commits, 2020/04/20
- 31/43: HACK gnu: python: Disable tests on the Hurd., guix-commits, 2020/04/20
- 30/43: gnu: tcl: Disable troublesome test on the Hurd., guix-commits, 2020/04/20
- 42/43: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/20
- 37/43: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/04/20
- 18/43: services: Add hurd-user-services-service-type., guix-commits, 2020/04/20
- 33/43: gnu: guix: Use gnutls-3.6.13 when cross-compiling., guix-commits, 2020/04/20
- 27/43: system: hurd: Create system profile for guix development.,
guix-commits <=
- 29/43: guile: Disable web-server test on the Hurd., guix-commits, 2020/04/20
- 38/43: gnu: guix: Add dependency on `hurd' when building for the Hurd., guix-commits, 2020/04/20
- 39/43: gnu: guix: Avoid loading (gnu installer) when cross compiling., guix-commits, 2020/04/20
- 36/43: gnu: guix: Cross-build fix: override compressors., guix-commits, 2020/04/20
- 40/43: Revert "compile: Run the load phase within 'with-target'.", guix-commits, 2020/04/20
- 43/43: gnu: guix: Run `make update-guix-package'., guix-commits, 2020/04/20
- 34/43: gnu: guix: Fix cross-compilation., guix-commits, 2020/04/20
- 35/43: gnu: guix: Cross-build fixup for wrap-program., guix-commits, 2020/04/20
- 41/43: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/20