mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Allow a plain list of packages in 'operating-system'.
* gnu/system.scm (union): Allow (PACKAGE OUTPUT), (PACKAGE), and PACKAGE. (<operating-system>)[packages]: Make the default a list of package? objects. * gnu/system/vm.scm (%demo-operating-system): Likewise. Add a few packages.
This commit is contained in:
parent
78ed003811
commit
4f62d8d6c7
2 changed files with 29 additions and 22 deletions
|
@ -78,12 +78,14 @@ (define-record-type* <operating-system> operating-system
|
||||||
(members '("guest"))))))
|
(members '("guest"))))))
|
||||||
|
|
||||||
(packages operating-system-packages ; list of (PACKAGE OUTPUT...)
|
(packages operating-system-packages ; list of (PACKAGE OUTPUT...)
|
||||||
(default `(("coreutils" ,coreutils)
|
(default (list coreutils ; or just PACKAGE
|
||||||
("grep" ,grep)
|
grep
|
||||||
("guile" ,guile)
|
sed
|
||||||
("bash" ,bash)
|
findutils
|
||||||
("dmd" ,(@ (gnu packages dmd) dmd))
|
guile
|
||||||
("guix" ,guix))))
|
bash
|
||||||
|
(@ (gnu packages dmd) dmd)
|
||||||
|
guix)))
|
||||||
|
|
||||||
(timezone operating-system-timezone) ; string
|
(timezone operating-system-timezone) ; string
|
||||||
(locale operating-system-locale) ; string
|
(locale operating-system-locale) ; string
|
||||||
|
@ -134,11 +136,11 @@ (define builder
|
||||||
(mlet %store-monad
|
(mlet %store-monad
|
||||||
((inputs (sequence %store-monad
|
((inputs (sequence %store-monad
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((name (? package? p))
|
((or ((? package? p)) (? package? p))
|
||||||
(mlet %store-monad
|
(mlet %store-monad
|
||||||
((drv (package->derivation p system)))
|
((drv (package->derivation p system)))
|
||||||
(return `(,name ,drv))))
|
(return `(,name ,drv))))
|
||||||
((name (? package? p) output)
|
(((? package? p) output)
|
||||||
(mlet %store-monad
|
(mlet %store-monad
|
||||||
((drv (package->derivation p system)))
|
((drv (package->derivation p system)))
|
||||||
(return `(,name ,drv ,output))))
|
(return `(,name ,drv ,output))))
|
||||||
|
|
|
@ -25,9 +25,11 @@ (define-module (gnu system vm)
|
||||||
#:use-module ((gnu packages base)
|
#:use-module ((gnu packages base)
|
||||||
#:select (%final-inputs
|
#:select (%final-inputs
|
||||||
guile-final gcc-final glibc-final
|
guile-final gcc-final glibc-final
|
||||||
|
ld-wrapper binutils-final
|
||||||
coreutils findutils grep sed))
|
coreutils findutils grep sed))
|
||||||
#:use-module (gnu packages guile)
|
#:use-module (gnu packages guile)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages less)
|
||||||
#:use-module (gnu packages qemu)
|
#:use-module (gnu packages qemu)
|
||||||
#:use-module (gnu packages parted)
|
#:use-module (gnu packages parted)
|
||||||
#:use-module (gnu packages zile)
|
#:use-module (gnu packages zile)
|
||||||
|
@ -416,20 +418,23 @@ (define %demo-operating-system
|
||||||
(uid 1000) (gid 100)
|
(uid 1000) (gid 100)
|
||||||
(comment "Guest of GNU")
|
(comment "Guest of GNU")
|
||||||
(home-directory "/home/guest"))))
|
(home-directory "/home/guest"))))
|
||||||
(packages `(("coreutils" ,coreutils)
|
(packages (list coreutils
|
||||||
("bash" ,bash)
|
bash
|
||||||
("guile" ,guile-2.0)
|
guile-2.0
|
||||||
("dmd" ,dmd)
|
dmd
|
||||||
("gcc" ,gcc-final)
|
gcc-final
|
||||||
("libc" ,glibc-final)
|
ld-wrapper ; must come before BINUTILS
|
||||||
("inetutils" ,inetutils)
|
binutils-final
|
||||||
("findutils" ,findutils)
|
glibc-final
|
||||||
("grep" ,grep)
|
inetutils
|
||||||
("sed" ,sed)
|
findutils
|
||||||
("procps" ,procps)
|
grep
|
||||||
("psmisc" ,psmisc)
|
sed
|
||||||
("zile" ,zile)
|
procps
|
||||||
("guix" ,guix)))))
|
psmisc
|
||||||
|
zile
|
||||||
|
less
|
||||||
|
guix))))
|
||||||
|
|
||||||
(define* (system-qemu-image #:optional (os %demo-operating-system))
|
(define* (system-qemu-image #:optional (os %demo-operating-system))
|
||||||
"Return the derivation of a QEMU image of the GNU system."
|
"Return the derivation of a QEMU image of the GNU system."
|
||||||
|
|
Loading…
Reference in a new issue