Git: Don't depend on Perl libs and Subversion when no Subversion support is built.
svn path=/nixpkgs/trunk/; revision=11877
This commit is contained in:
parent
bd0df285fa
commit
392d2f5acf
@ -1,6 +1,12 @@
|
|||||||
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs, cpio
|
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs, cpio
|
||||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
||||||
, libxslt, tcl, tk, makeWrapper, svnSupport, subversion, perlLibs }:
|
, libxslt, tcl, tk, makeWrapper
|
||||||
|
, svnSupport, subversion, perlLibs }:
|
||||||
|
|
||||||
|
# `git-svn' support requires Subversion and various Perl libraries.
|
||||||
|
# FIXME: We should make sure Subversion comes with its Perl bindings.
|
||||||
|
assert svnSupport -> (subversion != null && perlLibs != []);
|
||||||
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "git-1.5.5";
|
name = "git-1.5.5";
|
||||||
@ -33,6 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
else
|
else
|
||||||
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
|
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
|
||||||
echo "\`~/.nixpkgs/config.nix' file to change it." '')
|
echo "\`~/.nixpkgs/config.nix' file to change it." '')
|
||||||
|
|
||||||
+ (if svnSupport then
|
+ (if svnSupport then
|
||||||
|
|
||||||
''# wrap git-svn
|
''# wrap git-svn
|
||||||
@ -43,8 +50,10 @@ stdenv.mkDerivation rec {
|
|||||||
wrapProgram "$out/bin/git-svn" \
|
wrapProgram "$out/bin/git-svn" \
|
||||||
--set GITPERLLIB "$gitperllib" \
|
--set GITPERLLIB "$gitperllib" \
|
||||||
--prefix PATH : "${subversion}/bin" ''
|
--prefix PATH : "${subversion}/bin" ''
|
||||||
else ''# rm git-svn
|
else ''
|
||||||
rm $out/bin/git-svn '' )
|
echo "NOT installing \`git-svn' since \`svnSupport' is false."
|
||||||
|
rm $out/bin/git-svn '')
|
||||||
|
|
||||||
+ ''# Install man pages and Info manual
|
+ ''# Install man pages and Info manual
|
||||||
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
|
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
|
||||||
-C Documentation ''
|
-C Documentation ''
|
||||||
|
@ -5323,17 +5323,23 @@ let pkgs = rec {
|
|||||||
inherit (gnome) gtk libgtkhtml libart_lgpl;
|
inherit (gnome) gtk libgtkhtml libart_lgpl;
|
||||||
};
|
};
|
||||||
|
|
||||||
git = import ../applications/version-management/git {
|
git =
|
||||||
|
let svnSupport = getConfig [ "git" "svnSupport" ] false;
|
||||||
|
in
|
||||||
|
import ../applications/version-management/git {
|
||||||
inherit fetchurl stdenv curl openssl zlib expat perl gettext
|
inherit fetchurl stdenv curl openssl zlib expat perl gettext
|
||||||
asciidoc texinfo xmlto docbook2x
|
asciidoc texinfo xmlto docbook2x
|
||||||
docbook_xsl docbook_xml_dtd_42 libxslt
|
docbook_xsl docbook_xml_dtd_42 libxslt
|
||||||
cpio tcl tk makeWrapper;
|
cpio tcl tk makeWrapper;
|
||||||
|
|
||||||
# for git-svn support:
|
# `git-svn' support
|
||||||
svnSupport = getConfig [ "git" "svnSupport" ] false;
|
inherit svnSupport;
|
||||||
inherit subversion ;
|
subversion = (if svnSupport then subversion else null) ;
|
||||||
perlLibs = [ perlLWP perlURI perlTermReadKey subversion ];
|
perlLibs = (if svnSupport
|
||||||
|
then [ perlLWP perlURI perlTermReadKey subversion ]
|
||||||
|
else []);
|
||||||
|
|
||||||
|
# Emacs support
|
||||||
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
|
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user