This is a service designed to provide information about Guix. At the moment, this initial prototype gathers up information about packages, the associated metadata and derivations. The initial primary use case is to compare two different revisions of Guix, detecting which packages are new, no longer present, updated or otherwise different. It's based on the Mumi project. [1]: https://git.elephly.net/software/mumi.git
19 lines
774 B
Scheme
19 lines
774 B
Scheme
(define-module (guix-data-service model guix-revision-package)
|
|
#:use-module (squee)
|
|
#:export (insert-guix-revision-packages))
|
|
|
|
(define (insert-guix-revision-packages conn guix-revision-id package-ids)
|
|
(define insert
|
|
(string-append "INSERT INTO guix_revision_packages "
|
|
"(revision_id, package_id) "
|
|
"VALUES "
|
|
(string-join (map (lambda (package-id)
|
|
(simple-format
|
|
#f "(~A, ~A)"
|
|
guix-revision-id
|
|
package-id))
|
|
package-ids)
|
|
", ")
|
|
";"))
|
|
|
|
(exec-query conn insert))
|