mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 22:50:23 -05:00
gexp: 'directory-union' has a #:quiet? parameter.
* guix/gexp.scm (directory-union): Add #:quiet? and honor it.
This commit is contained in:
parent
59523429d6
commit
de98b302a1
1 changed files with 9 additions and 2 deletions
|
@ -1205,7 +1205,7 @@ (define (file-union name files)
|
||||||
files))))))
|
files))))))
|
||||||
|
|
||||||
(define* (directory-union name things
|
(define* (directory-union name things
|
||||||
#:key (copy? #f))
|
#:key (copy? #f) (quiet? #f))
|
||||||
"Return a directory that is the union of THINGS, where THINGS is a list of
|
"Return a directory that is the union of THINGS, where THINGS is a list of
|
||||||
file-like objects denoting directories. For example:
|
file-like objects denoting directories. For example:
|
||||||
|
|
||||||
|
@ -1213,7 +1213,8 @@ (define* (directory-union name things
|
||||||
|
|
||||||
yields a directory that is the union of the 'guile' and 'emacs' packages.
|
yields a directory that is the union of the 'guile' and 'emacs' packages.
|
||||||
|
|
||||||
When COPY? is true, copy files instead of creating symlinks."
|
When HARD-LINKS? is true, create hard links instead of symlinks. When QUIET?
|
||||||
|
is true, the derivation will not print anything."
|
||||||
(define symlink
|
(define symlink
|
||||||
(if copy?
|
(if copy?
|
||||||
(gexp (lambda (old new)
|
(gexp (lambda (old new)
|
||||||
|
@ -1222,6 +1223,11 @@ (define symlink
|
||||||
(copy-file old new))))
|
(copy-file old new))))
|
||||||
(gexp symlink)))
|
(gexp symlink)))
|
||||||
|
|
||||||
|
(define log-port
|
||||||
|
(if quiet?
|
||||||
|
(gexp (%make-void-port "w"))
|
||||||
|
(gexp (current-error-port))))
|
||||||
|
|
||||||
(match things
|
(match things
|
||||||
((one)
|
((one)
|
||||||
;; Only one thing; return it.
|
;; Only one thing; return it.
|
||||||
|
@ -1234,6 +1240,7 @@ (define symlink
|
||||||
(union-build (ungexp output)
|
(union-build (ungexp output)
|
||||||
'(ungexp things)
|
'(ungexp things)
|
||||||
|
|
||||||
|
#:log-port (ungexp log-port)
|
||||||
#:symlink (ungexp symlink)))))))))
|
#:symlink (ungexp symlink)))))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue