Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: df58d379ca93
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f24e74d159f6
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 6, 2019

  1. git, gitweb: Fix git-instaweb

    * Make the build system embed the correct path to gitweb into git-instaweb
    * Move gitweb fixups to the git expression, to make sure that gitweb
    used by git-instaweb is functional
    * This will increase the closure size of git, but only with perlSupport
    kirelagin committed Jan 6, 2019
    Copy the full SHA
    813c6d4 View commit details
  2. git: Do not split gitweb output

    This partially reverts 9029ed9 as
    `git-instaweb`, which comes with git, needs on gitweb and having them in
    separate outputs results in a cycle.
    kirelagin committed Jan 6, 2019
    Copy the full SHA
    047def4 View commit details

Commits on Aug 4, 2019

  1. Merge pull request #53494 from kirelagin/git-instaweb

    git, gitweb: Fix git-instaweb
    wmertens authored Aug 4, 2019
    Copy the full SHA
    f24e74d View commit details
Showing with 26 additions and 26 deletions.
  1. +14 −4 pkgs/applications/version-management/git-and-tools/git/default.nix
  2. +12 −22 pkgs/applications/version-management/git-and-tools/gitweb/default.nix
18 changes: 14 additions & 4 deletions pkgs/applications/version-management/git-and-tools/git/default.nix
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
, darwin
, withLibsecret ? false
, pkgconfig, glib, libsecret
, gzip # needed at runtime by gitweb.cgi
}:

assert sendEmailSupport -> perlSupport;
@@ -22,6 +23,8 @@ assert svnSupport -> perlSupport;
let
version = "2.22.0";
svn = subversionClient.override { perlBindings = perlSupport; };

gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
in

stdenv.mkDerivation {
@@ -32,7 +35,7 @@ stdenv.mkDerivation {
sha256 = "17zj6jwx3s6bybd290f1mj5iym1r64560rmnf0p63x4akxclp7hm";
};

outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
outputs = [ "out" ];

hardeningDisable = [ "format" ];

@@ -171,9 +174,6 @@ stdenv.mkDerivation {
# HTTP(s) transports for pushing
ln -s $out/libexec/git-core/git-http-backend $out/bin/git-http-backend
'' + stdenv.lib.optionalString perlSupport ''
# put in separate package for simpler maintenance
mv $out/share/gitweb $gitweb/
# 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}"
@@ -187,6 +187,16 @@ stdenv.mkDerivation {
--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}"
# 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
''

+ (if svnSupport then ''
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
{ stdenv, git, gzip, perlPackages, fetchFromGitHub
{ stdenv, buildEnv, git, fetchFromGitHub
, gitwebTheme ? false }:

let
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
gitwebThemeSrc = fetchFromGitHub {
owner = "kogakure";
repo = "gitweb-theme";
rev = "049b88e664a359f8ec25dc6f531b7e2aa60dd1a2";
sha256 = "0wksqma41z36dbv6w6iplkjfdm0ha3njp222fakyh4lismajr71p";
extraPostFetch = ''
mkdir -p "$TMPDIR/gitwebTheme"
mv "$out"/* "$TMPDIR/gitwebTheme/"
mkdir "$out/static"
mv "$TMPDIR/gitwebTheme"/* "$out/static/"
'';
sha256 = "17hypq6jvhy6zhh26lp3nyi52npfd5wy5752k6sq0shk4na2acqi";
};
in stdenv.mkDerivation {
in buildEnv {
name = "gitweb-${stdenv.lib.getVersion git}";

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"}
'';
ignoreCollisions = true;
paths = stdenv.lib.optional gitwebTheme "${gitwebThemeSrc}"
++ [ "${git}/share/gitweb" ];

meta = git.meta // {
maintainers = with stdenv.lib.maintainers; [ gnidorah ];