diff mbox

gnu: git: Fix gitweb.

Message ID 20161203115851.12830-1-rekado@elephly.net
State New
Headers show

Commit Message

Ricardo Wurmus Dec. 3, 2016, 11:58 a.m. UTC
* gnu/packages/version-control.scm (git)[inputs]: Add perl-cgi.
[arguments]: Wrap "gitweb.cgi" with PERL5LIB.
---
 gnu/packages/version-control.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Marius Bakke Dec. 3, 2016, 6:46 p.m. UTC | #1
Ricardo Wurmus <rekado@elephly.net> writes:

> * gnu/packages/version-control.scm (git)[inputs]: Add perl-cgi.
> [arguments]: Wrap "gitweb.cgi" with PERL5LIB.
> ---
>  gnu/packages/version-control.scm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

This LGTM and increases git closure with about 0.4 MiB.
Ricardo Wurmus Dec. 3, 2016, 7:21 p.m. UTC | #2
Marius Bakke <mbakke@fastmail.com> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> * gnu/packages/version-control.scm (git)[inputs]: Add perl-cgi.
>> [arguments]: Wrap "gitweb.cgi" with PERL5LIB.
>> ---
>>  gnu/packages/version-control.scm | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>
> This LGTM and increases git closure with about 0.4 MiB.

Thanks.  Pushed as 3bec8a016ff61e3e5dd1af86ee8423af4c168720.
diff mbox

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 03d7bbe..edd2d3a 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -141,6 +141,9 @@  as well as the classic centralized workflow.")
       ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
       ("zlib" ,zlib)
 
+      ;; For 'gitweb.cgi'
+      ("perl-cgi" ,perl-cgi)
+
       ;; For 'git-svn'.
       ("subversion" ,subversion)
       ("perl-term-readkey" ,perl-term-readkey)
@@ -257,6 +260,17 @@  as well as the classic centralized workflow.")
                                    "perl-net-smtp-ssl"
                                    "perl-io-socket-ssl")))))))
 
+              ;; Tell 'gitweb.cgi' where perl modules are.
+              (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
+                `("PERL5LIB" ":" prefix
+                  ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
+                        (list
+                         ,@(transitive-input-references
+                            'inputs
+                            (map (lambda (l)
+                                   (assoc l (inputs)))
+                                 '("perl-cgi")))))))
+
               ;; Tell 'git-submodule' where Perl is.
               (wrap-program git-sm
                 `("PATH" ":" prefix