aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-04-25 08:17:52 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 10:42:58 +0100
commit963b68f7f6e6e9aff13ad7cf52ed0578e6493b86 (patch)
treeda9d8bc2cf7cccfdf70f46f8a7f64b97966ba10f /gnu
parenta70c18a7c107ba0559143fe02b122ed2668cdd49 (diff)
downloadguix-963b68f7f6e6e9aff13ad7cf52ed0578e6493b86.tar
guix-963b68f7f6e6e9aff13ad7cf52ed0578e6493b86.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/cgit.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
index 8ef12cd5a0..3183535d4a 100644
--- a/gnu/services/cgit.scm
+++ b/gnu/services/cgit.scm
@@ -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 @@
'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 @@ for cgit to allow access to that repository.")
(define (rest? field)
(not (memq (configuration-field-name field)
'(project-list
+ extra-options
repository-directory
repositories))))
#~(string-append
@@ -649,6 +654,8 @@ for cgit to allow access to that repository.")
#$(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))