mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: cgit: Improve handling of extra-options.
* gnu/services/cgit.scm (serialize-cgit-configuration): Add the extra options, one per line, before the scan-path, as this makes it possible to use the extra-options to affect the global behaviour for repositories. (serialize-extra-options): New procedure.
This commit is contained in:
parent
57c5aa7c7d
commit
c3343d62f6
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
|
||||
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
||||
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -169,6 +170,9 @@ (define (serialize-project-list _ val)
|
|||
'project-list
|
||||
(plain-file "project-list" (string-join val "\n")))))
|
||||
|
||||
(define (serialize-extra-options extra-options)
|
||||
(string-join extra-options "\n" 'suffix))
|
||||
|
||||
(define repository-directory? string?)
|
||||
|
||||
(define (serialize-repository-directory _ val)
|
||||
|
@ -641,6 +645,7 @@ (define (serialize-cgit-configuration config)
|
|||
(define (rest? field)
|
||||
(not (memq (configuration-field-name field)
|
||||
'(project-list
|
||||
extra-options
|
||||
repository-directory
|
||||
repositories))))
|
||||
#~(string-append
|
||||
|
@ -649,6 +654,8 @@ (define (rest? field)
|
|||
#$(serialize-project-list
|
||||
'project-list
|
||||
(cgit-configuration-project-list config))
|
||||
#$(serialize-extra-options
|
||||
(cgit-configuration-extra-options config))
|
||||
#$(serialize-repository-directory
|
||||
'repository-directory
|
||||
(cgit-configuration-repository-directory config))
|
||||
|
|
Loading…
Reference in a new issue