forked from mirrors/nixpkgs
Improve git-svn support
svn path=/nixpkgs/trunk/; revision=20925
This commit is contained in:
parent
7531041ca4
commit
7af927d96b
|
@ -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];
|
||||
};
|
||||
|
||||
|
|
|
@ -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"
|
||||
'')
|
||||
|
|
Loading…
Reference in a new issue