Change:
start a webserver that is mean to serve for the current repo. In order to do this, it generates an httpd config with But the expression for moves to a separate output. Run in any repo.
Hm, ok, I have fixed the path issue, but it still doesn’t work because perl has no CGI module.

Discussion:
, darwin , withLibsecret ? false , pkgconfig, glib, libsecret <ins> , gzip # needed at runtime by gitweb.cgi </ins> }: assert sendEmailSupport -> perlSupport;

let version = "2.19.2"; svn = subversionClient.override { perlBindings = perlSupport; }; <ins> gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; </ins> in stdenv.mkDerivation {

sha256 = "1scbggzghkzzfqg4ky3qh7h9w87c3zya4ls5disz7dbx56is7sgw"; }; <del> outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb"; </del> <ins> outputs = [ "out" ]; </ins> hardeningDisable = [ "format" ];

# HTTP(s) transports for pushing ln -s $out/libexec/git-core/git-http-backend $out/bin/git-http-backend '' + stdenv.lib.optionalString perlSupport '' <del> # put in separate package for simpler maintenance mv $out/share/gitweb $gitweb/ </del> # wrap perl commands makeWrapper "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/git-credential-netrc  --set PERL5LIB   "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"

--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}" wrapProgram $out/libexec/git-core/git-cvsexportcommit  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}" <ins> # 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/${perlPackages.perl.libPrefix}";"  "$out/share/gitweb/gitweb.cgi" done </ins> '' + (if svnSupport then ''

<del> { stdenv, git, gzip, perlPackages, fetchFromGitHub </del> <ins> { stdenv, buildEnv, git, fetchFromGitHub </ins> , gitwebTheme ? false }: let <del> gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; </del> gitwebThemeSrc = fetchFromGitHub { owner = "kogakure"; repo = "gitweb-theme"; rev = "049b88e664a359f8ec25dc6f531b7e2aa60dd1a2"; <del> sha256 = "0wksqma41z36dbv6w6iplkjfdm0ha3njp222fakyh4lismajr71p"; </del> <ins> extraPostFetch = '' mkdir -p "$TMPDIR/gitwebTheme" mv "$out"/* "$TMPDIR/gitwebTheme/" mkdir "$out/static" mv "$TMPDIR/gitwebTheme"/* "$out/static/" ''; sha256 = "17hypq6jvhy6zhh26lp3nyi52npfd5wy5752k6sq0shk4na2acqi"; </ins> }; <del> in stdenv.mkDerivation { </del> <ins> in buildEnv { </ins> name = "gitweb-${stdenv.lib.getVersion git}"; <del> src = git.gitweb; installPhase = '' mkdir $out mv * $out # 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/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/${perlPackages.perl.libPrefix}";"  "$out/gitweb.cgi" done ${stdenv.lib.optionalString gitwebTheme "cp ${gitwebThemeSrc}/* $out/static"} ''; </del> <ins> ignoreCollisions = true; paths = stdenv.lib.optional gitwebTheme "${gitwebThemeSrc}" ++ [ "${git}/share/gitweb" ]; </ins> meta = git.meta // { maintainers = with stdenv.lib.maintainers; [ gnidorah ];