diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index cf24e21db0ef..eb1fe3f29a14 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -3,7 +3,8 @@ */ args: with args; with pkgs; let - inherit (pkgs) stdenv fetchurl getConfig subversion; + inherit (pkgs) stdenv fetchurl subversion; + config = getPkgConfig "git"; in rec { @@ -12,9 +13,9 @@ rec { asciidoc texinfo xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl tk makeWrapper subversion; - svnSupport = getConfig ["git" "svnSupport"] false; # for git-svn support - guiSupport = getConfig ["git" "guiSupport"] false; - perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey subversion]; + svnSupport = config "svnSupport" false; # for git-svn support + guiSupport = config "guiSupport" false; + perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey]; }; # The full-featured Git. @@ -25,11 +26,7 @@ rec { cpio tcl tk makeWrapper; svnSupport = true; guiSupport = true; - perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey subversion]; - # gitFull requires subversion with perlBindings enabled at least - subversion = pkgs.subversion.override { - perlBindings = true; - }; + perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey]; }; gitGit = import ./git/git-git.nix { @@ -37,8 +34,8 @@ rec { asciidoc texinfo xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl tk makeWrapper subversion autoconf; - svnSupport = getConfig ["git" "svnSupport"] false; # for git-svn support - guiSupport = getConfig ["git" "guiSupport"] false; + svnSupport = config "svnSupport" false; # for git-svn support + guiSupport = config "guiSupport" false; perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey subversion]; }; diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 7e4e903f2c7d..aae8676b9c30 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -6,8 +6,9 @@ , pythonSupport ? true }: -# `git-svn' support requires Subversion and various Perl libraries. -assert svnSupport -> (subversion != null && perlLibs != [] && subversion.perlBindings); +let + svn = subversion.override { perlBindings = true; }; +in stdenv.mkDerivation rec { name = "git-1.7.0.3"; @@ -49,12 +50,12 @@ stdenv.mkDerivation rec { ''# wrap git-svn gitperllib=$out/lib/perl5/site_perl - for i in ${builtins.toString perlLibs}; do + for i in ${builtins.toString perlLibs} ${svn}; do gitperllib=$gitperllib:$i/lib/perl5/site_perl done wrapProgram "$out/libexec/git-core/git-svn" \ --set GITPERLLIB "$gitperllib" \ - --prefix PATH : "${subversion}/bin" '' + --prefix PATH : "${svn}/bin" '' else '' # replace git-svn by notification script notSupported $out/bin/git-svn "reinstall with config git = { svnSupport = true } set" '')