fixed/removed extra git-svn wrapper. Now you can enable svn support by git = { svnSupport = true; }, git-svn executable is removed if you don't enable it
svn path=/nixpkgs/trunk/; revision=11849
This commit is contained in:
parent
e1aea4d59b
commit
b4ed67b58a
@ -1,6 +1,6 @@
|
||||
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs, cpio
|
||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
||||
, libxslt, tcl, tk, makeWrapper }:
|
||||
, libxslt, tcl, tk, makeWrapper, svnSupport, subversion, perlLibs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "git-1.5.5";
|
||||
@ -33,6 +33,18 @@ stdenv.mkDerivation rec {
|
||||
else
|
||||
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
|
||||
echo "\`~/.nixpkgs/config.nix' file to change it." '')
|
||||
+ (if svnSupport then
|
||||
|
||||
''# wrap git-svn
|
||||
gitperllib=$out/lib/site_perl
|
||||
for i in ${builtins.toString perlLibs}; do
|
||||
gitperllib=$gitperllib:$i/lib/site_perl
|
||||
done
|
||||
wrapProgram "$out/bin/git-svn" \
|
||||
--set GITPERLLIB "$gitperllib" \
|
||||
--prefix PATH : "${subversion}/bin" ''
|
||||
else ''# rm git-svn
|
||||
rm $out/bin/git-svn '' )
|
||||
+ ''# Install man pages and Info manual
|
||||
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
|
||||
-C Documentation ''
|
||||
|
@ -1,33 +0,0 @@
|
||||
{ stdenv, subversion, git, perlLibs }:
|
||||
|
||||
if (!subversion.perlBindings)
|
||||
then throw "svn perl bindings required to install gitsvnwrapper"
|
||||
else stdenv.mkDerivation {
|
||||
inherit perlLibs;
|
||||
name = "git-svn-wrapper";
|
||||
phases = "buildPhase";
|
||||
buildPhase = "
|
||||
gitperllib=${git}/lib/site_perl
|
||||
for i in \$perlLibs; do
|
||||
gitperllib=\$gitperllib:\$i/lib/site_perl
|
||||
done
|
||||
|
||||
ensureDir \$out/bin
|
||||
for a in ${git}/bin/git-svn; do
|
||||
target=\$out/bin/\$(basename $a)
|
||||
target=\$out/bin/\$(basename $a)
|
||||
echo \"#!/bin/sh
|
||||
export GITPERLLIB=\$gitperllib
|
||||
PATH=\\\$PATH:${subversion}/bin
|
||||
$a \\\"\\\$@\\\"
|
||||
\" > \$target
|
||||
chmod +x \$target
|
||||
done
|
||||
";
|
||||
|
||||
meta = {
|
||||
description = "git-svn, a bidirectional Git/Subversion gateway";
|
||||
license = "GPLv2";
|
||||
homepage = http://git.or.cz/;
|
||||
};
|
||||
}
|
@ -5315,12 +5315,13 @@ let pkgs = rec {
|
||||
asciidoc texinfo xmlto docbook2x
|
||||
docbook_xsl docbook_xml_dtd_42 libxslt
|
||||
cpio tcl tk makeWrapper;
|
||||
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
|
||||
};
|
||||
|
||||
gitsvnwrapper = import ../applications/version-management/git/git-svn-wrapper.nix {
|
||||
inherit subversion git stdenv;
|
||||
# for git-svn support:
|
||||
svnSupport = getConfig [ "git" "svnSupport" ] false;
|
||||
inherit subversion ;
|
||||
perlLibs = [ perlLWP perlURI perlTermReadKey subversion ];
|
||||
|
||||
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
|
||||
};
|
||||
|
||||
gkrellm = import ../applications/misc/gkrellm {
|
||||
|
Loading…
Reference in New Issue
Block a user