diff options
author | Christopher Baines <mail@cbaines.net> | 2019-11-14 21:32:47 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-11-14 21:32:47 +0000 |
commit | 8f6422463acada1417684f944c10c81b53c17ca7 (patch) | |
tree | 28548954af35304f77ab88cda4cabd2925b5f536 /guix-data-service/web/controller.scm | |
parent | a2bbc0ee0d0c388e95d971d47e4cbf6b42e7dbfc (diff) | |
download | data-service-8f6422463acada1417684f944c10c81b53c17ca7.tar data-service-8f6422463acada1417684f944c10c81b53c17ca7.tar.gz |
Add a basic page for derivation source files
Just so that the links work.
Diffstat (limited to 'guix-data-service/web/controller.scm')
-rw-r--r-- | guix-data-service/web/controller.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index feac0f1..1e8d46a 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -148,11 +148,17 @@ (let ((derivation (select-derivation-by-output-filename conn filename))) (match derivation (() - (render-html - #:sxml (general-not-found - "Store item not found" - "No derivation found producing this output") - #:code 404)) + (match (select-derivation-source-file-by-store-path conn filename) + (() + (render-html + #:sxml (general-not-found + "Store item not found" + "No derivation found producing this output") + #:code 404)) + ((id) + (render-html + #:sxml (view-derivation-source-file filename) + #:extra-headers http-headers-for-unchanging-content)))) (derivations (render-html #:sxml (view-store-item filename |