diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2015-06-23 16:35:16 +0200 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2015-06-23 16:37:07 -0400 |
commit | aad72327d17a1479f586af3cdb7123ffec2d9719 (patch) | |
tree | fec824a5e8f0add0de3e5ae008ea414dcec59bd9 /guix/web | |
parent | b97a8ef94909bd07f7f2013a399ab43e310693bd (diff) |
view: json: Add "location" field to JSON representation.
* guix/web/view/json.scm (package->json): Add "location" field.
Diffstat (limited to 'guix/web')
-rw-r--r-- | guix/web/view/json.scm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/web/view/json.scm b/guix/web/view/json.scm index e3f8bc1..73b78f3 100644 --- a/guix/web/view/json.scm +++ b/guix/web/view/json.scm @@ -25,6 +25,7 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix profiles) + #:use-module (guix utils) #:use-module (gnu packages) #:use-module (guix web package) #:export (all-packages-json @@ -63,6 +64,9 @@ ("version" ,(package-version package)) ("synopsis" ,(package-synopsis package)) ("description" ,(package-description package)) + ("location" ,(last (string-split (location-file + (package-location package)) + #\/))) ("homepage" ,(package-home-page package)) ("license" ,(serialize-license package)) ,@(if serialize-inputs? |