mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
distro: Add missing bits from previous commit.
* distro/packages/base.scm (default-keyword-arguments): New procedure.
This commit is contained in:
parent
a3f75312ec
commit
e300a0f8d2
1 changed files with 14 additions and 0 deletions
|
@ -1388,6 +1388,20 @@ (define %bootstrap-guile
|
|||
;; The Guile used to run the build scripts of the initial derivations.
|
||||
(nixpkgs-derivation* "guile"))
|
||||
|
||||
(define (default-keyword-arguments args defaults)
|
||||
"Return ARGS augmented with any keyword/value from DEFAULTS for
|
||||
keywords not already present in ARGS."
|
||||
(let loop ((defaults defaults)
|
||||
(args args))
|
||||
(match defaults
|
||||
((kw value rest ...)
|
||||
(loop rest
|
||||
(if (assoc-ref kw args)
|
||||
args
|
||||
(cons* kw value args))))
|
||||
(()
|
||||
args))))
|
||||
|
||||
(define-syntax substitute-keyword-arguments
|
||||
(syntax-rules ()
|
||||
"Return a new list of arguments where the value for keyword arg KW is
|
||||
|
|
Loading…
Reference in a new issue