Fix git-send-email.
git-send-email depends on Net::SMTP and Net::SMTP::SSL. Make sendEmailSupport a config for git, and bring these libraries. Wrap the send-email script, or replace with a not supported script. svn path=/nixpkgs/trunk/; revision=21789
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, python, gettext, cpio
|
||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
|
||||
, libxslt, tcl, tk, makeWrapper
|
||||
, svnSupport, subversion, perlLibs
|
||||
, svnSupport, subversion, perlLibs, smtpPerlLibs
|
||||
, guiSupport
|
||||
, pythonSupport ? true
|
||||
, sendEmailSupport
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -60,6 +61,18 @@ stdenv.mkDerivation rec {
|
||||
notSupported $out/bin/git-svn "reinstall with config git = { svnSupport = true } set"
|
||||
'')
|
||||
|
||||
+ (if sendEmailSupport then
|
||||
''# wrap git-send-email
|
||||
gitperllib=$out/lib/perl5/site_perl
|
||||
for i in ${builtins.toString smtpPerlLibs}; do
|
||||
gitperllib=$gitperllib:$i/lib/perl5/site_perl
|
||||
done
|
||||
wrapProgram "$out/libexec/git-core/git-send-email" \
|
||||
--set GITPERLLIB "$gitperllib" ''
|
||||
else '' # replace git-send-email by notification script
|
||||
notSupported $out/bin/git-send-email "reinstall with config git = { sendEmailSupport = true } set"
|
||||
'')
|
||||
|
||||
+ ''# Install man pages and Info manual
|
||||
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
|
||||
-C Documentation ''
|
||||
|
||||
Reference in New Issue
Block a user