Include the location in package JSON responses

This commit is contained in:
Christopher Baines 2025-06-24 15:16:37 +02:00
parent 9b79543a73
commit a017cddebc
2 changed files with 7 additions and 1 deletions

View file

@ -200,7 +200,9 @@ WHERE packages.id IN (
(match-lambda
((synopsis synopsis-locale description description-locale home-page file line column-number
license-json)
(list synopsis synopsis-locale description description-locale home-page file line column-number
(list synopsis synopsis-locale description description-locale home-page file
(and=> line string->number)
(and=> column-number string->number)
(if (string-null? license-json)
#()
(json-string->scm license-json)))))

View file

@ -999,6 +999,10 @@
licenses))
`((synopsis . ,(texinfo->variants-alist synopsis synopsis-locale))
(description . ,(texinfo->variants-alist description description-locale))
(location
. ((file . ,file)
(line . ,line)
(column . ,column-number)))
(home-page . ,home-page))))
(derivations . ,(list->vector
(map (match-lambda