git: fix gitweb.cgi breakage due to missing CGI.pm
CGI.pm was removed from Perl core in v5.22, breaking the gitweb.cgi script and thus NixOS' services.lighttpd.gitweb. Nixpkgs switched to Perl 5.22 with a85ba820a409c84d97ca0 ("perl: Make 5.22 the default"). Fix it by bringing in the Perl CGI module (and dependency HTMLParser). The closure size of "nix-build -A git" increase by 1 MiB, to 201 MiB.
This commit is contained in:
parent
3d0e8060fd
commit
e7ef33c50a
@ -15,6 +15,7 @@ let
|
|||||||
perlPackages.MIMEBase64 perlPackages.AuthenSASL
|
perlPackages.MIMEBase64 perlPackages.AuthenSASL
|
||||||
perlPackages.DigestHMAC
|
perlPackages.DigestHMAC
|
||||||
];
|
];
|
||||||
|
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser ];
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, gnugrep, gzip, openssh
|
, gnugrep, gzip, openssh
|
||||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
|
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
|
||||||
, libxslt, tcl, tk, makeWrapper, libiconv
|
, libxslt, tcl, tk, makeWrapper, libiconv
|
||||||
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
, svnSupport, subversionClient, perlLibs, smtpPerlLibs, gitwebPerlLibs
|
||||||
, guiSupport
|
, guiSupport
|
||||||
, withManual ? true
|
, withManual ? true
|
||||||
, pythonSupport ? true
|
, pythonSupport ? true
|
||||||
@ -102,6 +102,11 @@ stdenv.mkDerivation {
|
|||||||
# gitweb.cgi, need to patch so that it's found
|
# gitweb.cgi, need to patch so that it's found
|
||||||
sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
|
sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
|
||||||
$out/share/gitweb/gitweb.cgi
|
$out/share/gitweb/gitweb.cgi
|
||||||
|
# Give access to CGI.pm and friends (was removed from perl core in 5.22)
|
||||||
|
for p in ${stdenv.lib.concatStringsSep " " gitwebPerlLibs}; do
|
||||||
|
sed -i -e "/use CGI /i use lib \"$p/lib/perl5/site_perl\";" \
|
||||||
|
"$out/share/gitweb/gitweb.cgi"
|
||||||
|
done
|
||||||
|
|
||||||
# Also put git-http-backend into $PATH, so that we can use smart
|
# Also put git-http-backend into $PATH, so that we can use smart
|
||||||
# HTTP(s) transports for pushing
|
# HTTP(s) transports for pushing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user