From c1fad22cd1767b8f64c66a1bd2f47ecf387a992a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 1 Sep 2019 13:04:23 +0100 Subject: Handle a change in guix with the record The first field is now a record, rather than a store path for the derivation. It's probably not necessary to cope with two versions, but this is what I've done currently. --- guix-data-service/model/derivation.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm index df44814..6b94384 100644 --- a/guix-data-service/model/derivation.scm +++ b/guix-data-service/model/derivation.scm @@ -277,12 +277,20 @@ ORDER BY derivations.system DESC, (insert-into-derivation-inputs (append-map (match-lambda - (($ path sub-derivations) - (map (lambda (sub-derivation) - (select-derivation-output-id conn - sub-derivation - path)) - sub-derivations))) + (($ derivation-or-path sub-derivations) + (let ((path + (match derivation-or-path + ((? derivation? d) + ;; The first field changed to a derivation (from the file + ;; name) in 5cf4b26d52bcea382d98fb4becce89be9ee37b55 + (derivation-file-name d)) + ((? string? s) + s)))) + (map (lambda (sub-derivation) + (select-derivation-output-id conn + sub-derivation + path)) + sub-derivations)))) derivation-inputs))))) (define (select-from-derivation-source-files store-paths) -- cgit v1.2.3