diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 9adb25f..0739b78 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -933,61 +933,62 @@ (define has-replacement? (assq-ref query-parameters 'has_replacement)) - (fibers-let ((metadata - (with-resource-from-pool (connection-pool) conn - (select-package-metadata-by-revision-name-and-version - conn - commit-hash - name - version - locale - #:replacement? has-replacement?))) - (derivations - (with-resource-from-pool (connection-pool) conn + (fibers-let + ((metadata + (with-resource-from-pool (connection-pool) conn + (select-package-metadata-by-revision-name-and-version + conn + commit-hash + name + version + locale + #:replacement? has-replacement?))) + (derivations + (with-resource-from-pool (connection-pool) conn + (map + (lambda (derivation-details) + (append + derivation-details + (list (map - (lambda (derivation-details) - (append - derivation-details - (list - (map - (match-lambda - ((name path hash-algorithm hash recursive?) - `((name . ,name) - (path . ,path) - (hash_algorithm . ,hash-algorithm) - (hash . ,hash) - (recursive? . ,recursive?) - (nars - . ,(list->vector - (map (match-lambda - ((hash-algorithm hash size - urls signatures) - `((hash . ((algorithm . ,hash-algorithm) - (value . ,hash))) - (size . ,size)))) - (select-nars-for-output - conn - path))))))) - (select-derivation-outputs-by-derivation-file-name - conn - (third derivation-details)))))) - (select-derivations-by-revision-name-and-version + (match-lambda + ((name path hash-algorithm hash recursive?) + `((name . ,name) + (path . ,path) + (hash_algorithm . ,hash-algorithm) + (hash . ,hash) + (recursive? . ,recursive?) + (nars + . ,(list->vector + (map (match-lambda + ((hash-algorithm hash size + urls signatures) + `((hash . ((algorithm . ,hash-algorithm) + (value . ,hash))) + (size . ,size)))) + (select-nars-for-output + conn + path))))))) + (select-derivation-outputs-by-derivation-file-name conn - commit-hash - name - version)))) - (git-repositories - (with-resource-from-pool (connection-pool) conn - (git-repositories-containing-commit conn - commit-hash))) - (lint-warnings - (with-resource-from-pool (connection-pool) conn - (select-lint-warnings-by-revision-package-name-and-version - conn - commit-hash - name - version - #:locale locale)))) + (third derivation-details)))))) + (select-derivations-by-revision-name-and-version + conn + commit-hash + name + version)))) + (git-repositories + (with-resource-from-pool (connection-pool) conn + (git-repositories-containing-commit conn + commit-hash))) + (lint-warnings + (with-resource-from-pool (connection-pool) conn + (select-lint-warnings-by-revision-package-name-and-version + conn + commit-hash + name + version + #:locale locale)))) (case (most-appropriate-mime-type '(application/json text/html) mime-types)