From 3f3e2d002cb8c740081d58e83b6e89236d11f15f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 6 Oct 2022 08:45:48 -0400 Subject: [PATCH] gnu: version-control: Add make-gitolite procedure. * gnu/packages/version-control.scm (make-gitolite): New procedure. (gitolite): Use make-gitolite. * doc/guix.texi (Gitolite service): Document how to use make-gitolite. --- doc/guix.texi | 15 ++++++++++++++- gnu/packages/version-control.scm | 15 +++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 523711bdf6..533b12d738 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35285,7 +35285,20 @@ Data type representing the configuration for @code{gitolite-service-type}. @table @asis @item @code{package} (default: @var{gitolite}) -Gitolite package to use. +Gitolite package to use. There are optional Gitolite dependencies that +are not included in the default package, such as Redis and git-annex. +These features can be made available by using the @code{make-gitolite} +procedure in the @code{(gnu packages version-control}) module to produce +a variant of Gitolite with the desired additional dependencies. + +The following code returns a package in which the Redis and git-annex +programs can be invoked by Gitolite's scripts: + +@example +(use-modules (gnu packages databases) + (gnu packages haskell-apps)) +(make-gitolite (list redis git-annex)) +@end example @item @code{user} (default: @var{git}) User to use for Gitolite. This will be user that you use when accessing diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index bd0ad70ce8..68358cc1d1 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -137,7 +137,8 @@ (define-module (gnu packages version-control) #:use-module (gnu packages tls) #:use-module (gnu packages) #:use-module (ice-9 match) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (make-gitolite)) (define-public breezy (package @@ -1482,7 +1483,9 @@ (define-public git-test-sequence also walk each side of a merge and test those changes individually.") (license (license:x11-style "file://LICENSE"))))) -(define-public gitolite +(define* (make-gitolite #:optional (extra-inputs '())) + "Make a gitolite package object with EXTRA-INPUTS added to the binary +wrappers, to be used for optional gitolite extensions." (package (name "gitolite") (version "3.6.12") @@ -1574,10 +1577,12 @@ (define-public gitolite (list #$output #$coreutils #$findutils - #$git))))) + #$git + #$@extra-inputs))))) '("/bin/gitolite" "/bin/gitolite-shell"))))))) (inputs - (list bash-minimal coreutils findutils git inetutils openssh perl)) + (append (list bash-minimal coreutils findutils git inetutils openssh perl) + extra-inputs)) (home-page "https://gitolite.com") (synopsis "Git access control layer") (description @@ -1585,6 +1590,8 @@ (define-public gitolite control to Git repositories.") (license license:gpl2))) +(define-public gitolite (make-gitolite)) + (define-public gitile (package (name "gitile") -- 2.37.2