2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/guix-cuirass.git synced 2023-12-14 06:03:04 +01:00

specification: channel->sexp: Add introduction support.

* src/cuirass/specification.scm (channel->sexp): Add channel introduction
support.
This commit is contained in:
Mathieu Othacehe 2021-03-10 13:48:03 +01:00
parent fc582f5b0e
commit 826e2df45e
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -18,6 +18,9 @@
(define-module (cuirass specification)
#:use-module (guix channels)
#:use-module ((guix openpgp)
#:select (openpgp-public-key-fingerprint
openpgp-format-fingerprint))
#:use-module (guix records)
#:use-module (guix ui)
#:use-module (guix utils)
@ -91,12 +94,25 @@
(define (channel->sexp channel)
"Return an sexp describing CHANNEL."
`(repository
(version 0)
(url ,(channel-url channel))
(branch ,(channel-branch channel))
(commit ,(channel-commit channel))
(name ,(channel-name channel))))
(let ((intro (channel-introduction channel)))
`(repository
(version 0)
(url ,(channel-url channel))
(branch ,(channel-branch channel))
(commit ,(channel-commit channel))
(name ,(channel-name channel))
,@(if intro
`((introduction
(channel-introduction
(version 0)
(commit
,(channel-introduction-first-signed-commit
intro))
(signer
,(openpgp-format-fingerprint
(channel-introduction-first-commit-signer
intro))))))
'()))))
;;;