aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/comparison.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-03-17 22:44:09 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-17 22:44:09 +0000
commit189014f3bc5a9526970ec3bf86104fd92f43bef6 (patch)
tree6e43c4b4e91f94685b9ad1bcf7959ee1db896770 /guix-data-service/comparison.scm
parent0d16c87da89372f6d813a753f309f8e3b0a42e18 (diff)
downloaddata-service-189014f3bc5a9526970ec3bf86104fd92f43bef6.tar
data-service-189014f3bc5a9526970ec3bf86104fd92f43bef6.tar.gz
Improve the compare derivations page
Add support for filtering the results, and add the system and target to the output.
Diffstat (limited to 'guix-data-service/comparison.scm')
-rw-r--r--guix-data-service/comparison.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm
index 68cafa8..733d740 100644
--- a/guix-data-service/comparison.scm
+++ b/guix-data-service/comparison.scm
@@ -98,7 +98,9 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
(select-derivations-by-id conn derivation-ids)))
derivation-data))
-(define (package-data-vhash->derivations-and-build-status conn packages-vhash)
+(define (package-data-vhash->derivations-and-build-status conn packages-vhash
+ systems targets
+ build-statuses)
(define (vhash->derivation-file-names vhash)
(vhash-fold (lambda (key value result)
(cons (third value)
@@ -109,9 +111,12 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
(let* ((derivation-file-names
(vhash->derivation-file-names packages-vhash))
(derivation-data
- (select-derivations-and-build-status-by-file-name
+ (select-derivations-and-build-status
conn
- derivation-file-names)))
+ #:file-names derivation-file-names
+ #:systems systems
+ #:targets targets
+ #:build-statuses build-statuses)))
derivation-data))
(define (package-data-vhash->package-name-and-version-vhash vhash)