diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/web/view/json.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/guix/web/view/json.scm b/guix/web/view/json.scm index 4fe45a2..e3f8bc1 100644 --- a/guix/web/view/json.scm +++ b/guix/web/view/json.scm @@ -32,10 +32,17 @@ generations-json)) (define (license->json license) - (json - (object - ("name" ,(license-name license)) - ("uri" ,(license-uri license))))) + (match license + ((? license? license) + (json + (object + ("name" ,(license-name license)) + ("uri" ,(license-uri license))))) + (_ ; a dubious license that we'd rather handle gracefully + (json + (object + ("name" ,(object->string license)) + ("uri" "http://www.gnu.org")))))) (define* (package->json package #:optional serialize-inputs?) (define (serialize-license package) |