nixos/gitweb: add gitwebTheme option

This commit is contained in:
gnidorah
2018-04-17 20:07:01 +03:00
parent a415a95e7c
commit 9029ed933c
7 changed files with 65 additions and 19 deletions
@@ -1,9 +1,9 @@
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, python, gettext, cpio
, gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc
, gzip, openssh, pcre2
, openssh, pcre2
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
, libxslt, tcl, tk, makeWrapper, libiconv
, svnSupport, subversionClient, perlLibs, smtpPerlLibs, gitwebPerlLibs
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
, guiSupport
, withManual ? true
, pythonSupport ? true
@@ -25,6 +25,8 @@ stdenv.mkDerivation {
sha256 = "0j1dwvg5llnj3g0fp8hdgpms4hp90qw9f6509vqw30dhwplrjpfn";
};
outputs = [ "out" "gitweb" ];
hardeningDisable = [ "format" ];
patches = [
@@ -131,15 +133,8 @@ stdenv.mkDerivation {
substituteInPlace $out/libexec/git-core/git-sh-i18n \
--subst-var-by gettext ${gettext}
# gzip (and optionally bzip2, xz, zip) are runtime dependencies for
# 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
# put in separate package for simpler maintenance
mv $out/share/gitweb $gitweb/
# Also put git-http-backend into $PATH, so that we can use smart
# HTTP(s) transports for pushing