diff options
| author | Tomas Volf <~@wolfsden.cz> | 2025-04-01 00:10:07 +0200 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-03 21:15:58 +0900 |
| commit | a52a7d1653cf6d75e1eecbc7b790e87e600587b3 (patch) | |
| tree | ecd73e889361c9efa98a48d3dc55cc6e2ede9304 /gnu/services | |
| parent | c6d27c20f4685a9ac1299974f6ace42ae29f474d (diff) | |
services: gitolite-rc-file-compiler: Switch to match-record.
* gnu/services/version-control.scm (gitolite-rc-file-compiler): Use
match-record instead of match with $.
Change-Id: Ia2f4985e921aee5f8859d1858f7c186b707d7a36
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/version-control.scm | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 06b6ff224dc..f5558e9197d 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu> +;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -267,33 +268,33 @@ access to exported repositories under @file{/srv/git}." (define-gexp-compiler (gitolite-rc-file-compiler (file <gitolite-rc-file>) system target) - (match file - (($ <gitolite-rc-file> umask local-code unsafe-pattern git-config-keys roles enable) - (apply text-file* "gitolite.rc" - `("%RC = (\n" - " UMASK => " ,(format #f "~4,'0o" umask) ",\n" - " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" - ,(if local-code - (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) - "") - " ROLES => {\n" - ,@(map (match-lambda - ((role . value) - (simple-format #f " ~A => ~A,\n" role value))) - roles) - " },\n" - "\n" - " ENABLE => [\n" - ,@(map (lambda (value) - (simple-format #f " '~A',\n" value)) - enable) - " ],\n" - ");\n" - "\n" - ,(if unsafe-pattern - (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") - "") - "1;\n"))))) + (match-record file <gitolite-rc-file> + (umask local-code unsafe-pattern git-config-keys roles enable) + (apply text-file* "gitolite.rc" + `("%RC = (\n" + " UMASK => " ,(format #f "~4,'0o" umask) ",\n" + " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" + ,(if local-code + (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) + "") + " ROLES => {\n" + ,@(map (match-lambda + ((role . value) + (simple-format #f " ~A => ~A,\n" role value))) + roles) + " },\n" + "\n" + " ENABLE => [\n" + ,@(map (lambda (value) + (simple-format #f " '~A',\n" value)) + enable) + " ],\n" + ");\n" + "\n" + ,(if unsafe-pattern + (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") + "") + "1;\n")))) (define-record-type* <gitolite-configuration> gitolite-configuration make-gitolite-configuration |
