--- Begin Message ---
Subject: |
[PATCH 0/1] gnu: services: version-control: Add cgit. |
Date: |
Wed, 30 Aug 2017 00:16:27 +0300 |
>From 65fa66cd761f3a9f8c6e84f8b5f7d8c643fe9731 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <address@hidden>
Date: Wed, 30 Aug 2017 00:06:43 +0300
Subject: [PATCH 0/1] gnu: services: version-control: Add cgit.
Hello Guix,
Here is cgit based on nginx service.
<#part type="text/plain" filename="~/dotfiles/guix/system-cgit.scm"
disposition=attachment description=system-cgit.scm>
<#/part>
I tested with
--8<---------------cut here---------------start------------->8---
mkdir /tmp/cgit
$(./pre-inst-env guix system vm system-cgit.scm --share=/tmp/cgit=/srv/git)
-daemonize -net nic,model=virtio -net user,hostfwd=tcp::10080-:80
icecat localhost:10080
--8<---------------cut here---------------end--------------->8---
Oleg Pykhalov (1):
gnu: services: version-control: Add cgit.
doc/guix.texi | 63 +++++++++++++++++++++++
gnu/services/version-control.scm | 108 ++++++++++++++++++++++++++++++++++++++-
gnu/services/web.scm | 4 ++
3 files changed, 174 insertions(+), 1 deletion(-)
--
2.14.1
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#28283] Status: [PATCH 1/1] gnu: services: version-control: Add cgit. |
Date: |
Tue, 03 Oct 2017 15:07:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Oleg Pykhalov <address@hidden> skribis:
> From 984b619620046015113cc4876569f5c87dd37c79 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <address@hidden>
> Date: Thu, 28 Sep 2017 20:02:35 +0300
> Subject: [PATCH] gnu: services: version-control: Add cgit.
>
> * gnu/services/version-control.scm
> (<cgit-configuration-file>, <cgit-configuration>): New record types.
> (cgit-configuration-robots-string, cgit-activation,
> cgit-configuration-nginx-config): New procedures.
> (%cgit-configuration-nginx, cgit-service-type): New variables.
> * doc/guix.texi (Version Control): Document the cgit service.
> ---
> doc/guix.texi | 65 ++++++++++++++++
> gnu/local.mk | 1 +
> gnu/services/version-control.scm | 119 ++++++++++++++++++++++++++++-
> gnu/tests/version-control.scm | 161
> +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 345 insertions(+), 1 deletion(-)
> create mode 100644 gnu/tests/version-control.scm
Awesome!
I took the liberty to add more URL tests:
--8<---------------cut here---------------start------------->8---
;; Make sure we can access pages that correspond to our repository.
(letrec-syntax ((test-url
(syntax-rules ()
((_ path code)
(test-equal (string-append "GET " path)
code
(let-values (((response body)
(http-get (string-append
"http://localhost:8080"
path))))
(response-code response))))
((_ path)
(test-url path 200)))))
(test-url "/")
(test-url "/test")
(test-url "/test/log")
(test-url "/test/tree")
(test-url "/test/does-not-exist" 404)
(test-url "/does-not-exist" 404))
--8<---------------cut here---------------end--------------->8---
Will push in a minute. Thank you!
Ludo’.
--- End Message ---