mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
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 a85ba820a4
("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.DigestHMAC
|
||||
];
|
||||
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser ];
|
||||
};
|
||||
|
||||
in
|
||||
|
@ -2,7 +2,7 @@
|
||||
, gnugrep, gzip, openssh
|
||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
|
||||
, libxslt, tcl, tk, makeWrapper, libiconv
|
||||
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
||||
, svnSupport, subversionClient, perlLibs, smtpPerlLibs, gitwebPerlLibs
|
||||
, guiSupport
|
||||
, withManual ? true
|
||||
, pythonSupport ? true
|
||||
@ -102,6 +102,11 @@ stdenv.mkDerivation {
|
||||
# gitweb.cgi, need to patch so that it's found
|
||||
sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
|
||||
$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
|
||||
# HTTP(s) transports for pushing
|
||||
|
Loading…
Reference in New Issue
Block a user