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
(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,
derivation_output_details.recursive,
@ -599,8 +601,11 @@ ORDER BY derivation_output_details.path
"")))
(map (match-lambda
((path hash_algorithm hash recursive nars_json)
(list path
((package_name package_version
path hash_algorithm hash recursive nars_json)
(list package_name
package_version
path
hash
hash_algorithm
(string=? recursive "t")

View file

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

View file

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