Handle a change in guix with the <derivation-input> record

The first field is now a <derivation> 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.
This commit is contained in:
Christopher Baines 2019-09-01 13:04:23 +01:00
parent 3ad100bedc
commit c1fad22cd1

View file

@ -277,12 +277,20 @@ ORDER BY derivations.system DESC,
(insert-into-derivation-inputs
(append-map
(match-lambda
(($ <derivation-input> path sub-derivations)
(map (lambda (sub-derivation)
(select-derivation-output-id conn
sub-derivation
path))
sub-derivations)))
(($ <derivation-input> 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)