Include package details for the package derivation outputs JSON

So it's easier to match the output back to the package.
This commit is contained in:
Christopher Baines 2020-10-13 18:51:21 +01:00
parent 4231f11cb8
commit f15dc5ab0b
3 changed files with 16 additions and 7 deletions

View file

@ -463,7 +463,9 @@ ORDER BY derivations.file_name
(define query (define query
(string-append (string-append
" "
SELECT derivation_output_details.path, SELECT packages.name,
packages.version,
derivation_output_details.path,
derivation_output_details.hash_algorithm, derivation_output_details.hash_algorithm,
derivation_output_details.hash, derivation_output_details.hash,
derivation_output_details.recursive, derivation_output_details.recursive,
@ -599,8 +601,11 @@ ORDER BY derivation_output_details.path
""))) "")))
(map (match-lambda (map (match-lambda
((path hash_algorithm hash recursive nars_json) ((package_name package_version
(list path path hash_algorithm hash recursive nars_json)
(list package_name
package_version
path
hash hash
hash_algorithm hash_algorithm
(string=? recursive "t") (string=? recursive "t")

View file

@ -1127,9 +1127,12 @@
`((store_paths `((store_paths
. ,(list->vector . ,(list->vector
(map (match-lambda (map (match-lambda
((path hash-algorithm hash recursive ((package-name package-version
nars) path hash-algorithm hash recursive
`((path . ,path) nars)
`((package . ((name . ,package-name)
(version . ,package-version)))
(path . ,path)
(data (data
. ,(if (null? hash-algorithm) . ,(if (null? hash-algorithm)
(list->vector (list->vector

View file

@ -1790,7 +1790,8 @@ figure {
(tbody (tbody
,@(map ,@(map
(match-lambda (match-lambda
((path hash-algorithm hash recursive nars) ((package-name package-version
path hash-algorithm hash recursive nars)
`(tr `(tr
(td (a (@ (href ,path)) (td (a (@ (href ,path))
,(display-store-item-short path))) ,(display-store-item-short path)))