mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
check-available-binaries: Use 'substitution-oracle'.
* build-aux/check-available-binaries.scm: Use 'substitution-oracle'. Changer caller and 'warn' accordingly.
This commit is contained in:
parent
619c9522b2
commit
df5188ddfa
1 changed files with 10 additions and 10 deletions
|
@ -37,18 +37,18 @@
|
|||
%bootstrap-tarballs <>)
|
||||
'("mips64el-linux-gnuabi64")))
|
||||
(total (append native cross)))
|
||||
(define (warn proc)
|
||||
(lambda (drv)
|
||||
(or (proc drv)
|
||||
(begin
|
||||
(format (current-error-port) "~a is not substitutable~%"
|
||||
drv)
|
||||
#f))))
|
||||
(define (warn item system)
|
||||
(format (current-error-port) "~a (~a) is not substitutable~%"
|
||||
item system)
|
||||
#f)
|
||||
|
||||
(set-build-options store #:use-substitutes? #t)
|
||||
(let ((result (every (compose (warn (cut has-substitutes? store <>))
|
||||
derivation->output-path)
|
||||
total)))
|
||||
(let* ((substitutable? (substitution-oracle store total))
|
||||
(result (every (lambda (drv)
|
||||
(let ((out (derivation->output-path drv)))
|
||||
(or (substitutable? out)
|
||||
(warn out (derivation-system drv)))))
|
||||
total)))
|
||||
(when result
|
||||
(format (current-error-port) "~a packages found substitutable~%"
|
||||
(length total)))
|
||||
|
|
Loading…
Reference in a new issue