Include the status of derivations

On the comparison page.
This commit is contained in:
Christopher Baines 2019-03-06 22:58:05 +00:00
parent 7a90afe980
commit e656b0967b
Signed by: cbaines
GPG key ID: 5E28A33B0B84F577
4 changed files with 63 additions and 22 deletions

View file

@ -8,6 +8,7 @@
#:export (package-data->package-data-vhashes
package-differences-data
package-data-vhash->derivations
package-data-vhash->derivations-and-build-status
package-data-vhashes->new-packages
package-data-vhashes->removed-packages
package-data-version-changes
@ -61,6 +62,20 @@ ORDER BY base_packages.name, base_packages.version, target_packages.name, target
(select-derivations-by-id conn derivation-ids)))
derivation-data))
(define (package-data-vhash->derivations-and-build-status conn packages-vhash)
(define (vhash->derivation-ids vhash)
(vhash-fold (lambda (key value result)
(cons (third value)
result))
'()
vhash))
(let* ((derivation-ids
(vhash->derivation-ids packages-vhash))
(derivation-data
(select-derivations-and-build-status-by-id conn derivation-ids)))
derivation-data))
(define (package-data-vhash->package-name-and-version-vhash vhash)
(vhash-fold (lambda (name details result)
(vhash-cons (cons name (first details))