2019-02-26 12:45:54 +01:00
|
|
|
{ stdenv, python, xmpppy, pythonPackages, fetchcvs, runtimeShell } :
|
2009-04-13 01:27:55 +02:00
|
|
|
|
2016-01-24 16:50:54 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pyMAILt";
|
2016-01-24 16:50:54 +01:00
|
|
|
version = "20090101";
|
|
|
|
|
|
|
|
src = fetchcvs {
|
2009-04-13 01:27:55 +02:00
|
|
|
cvsRoot = ":pserver:anonymous@xmpppy.cvs.sourceforge.net:/cvsroot/xmpppy";
|
|
|
|
module = "xmpppy/mail-transport";
|
|
|
|
date = "2009-01-01";
|
|
|
|
sha256 = "15301252e52b4ccb2156baefed8982a2a0cce3ae8eae3caf3cc28dfa615c8d6e";
|
|
|
|
};
|
|
|
|
|
2016-01-24 16:50:54 +01:00
|
|
|
pythonPath = [ xmpppy ];
|
|
|
|
buildInputs = [ pythonPackages.wrapPython ];
|
2009-04-13 01:27:55 +02:00
|
|
|
|
2016-01-24 16:50:54 +01:00
|
|
|
installPhase = ''
|
2009-04-13 01:27:55 +02:00
|
|
|
cd mail-transport
|
2019-08-15 14:41:18 +02:00
|
|
|
mkdir -p $out/bin $out/share/${pname}-${version}
|
2016-01-24 16:50:54 +01:00
|
|
|
sed -e 's@/usr/bin/@${python}/bin/@' -i mail.py
|
2009-04-13 01:27:55 +02:00
|
|
|
sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.pyMAILt.xml"]' -i config.py
|
|
|
|
sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.python-mail-transport.xml"]' -i config.py
|
|
|
|
sed -e '/configFiles/iimport os' -i config.py
|
|
|
|
cp * $out/share/$name
|
2016-01-24 16:50:54 +01:00
|
|
|
cat > $out/bin/pyMAILt <<EOF
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2019-08-15 14:41:18 +02:00
|
|
|
cd $out/share/${pname}-${version}
|
2016-01-24 16:50:54 +01:00
|
|
|
./mail.py \"$@\"
|
|
|
|
EOF
|
2019-08-15 14:41:18 +02:00
|
|
|
chmod a+rx $out/bin/pyMAILt $out/share/${pname}-${version}/mail.py
|
2016-01-24 16:50:54 +01:00
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
2015-09-15 06:27:19 +02:00
|
|
|
|
2018-11-14 23:20:04 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-04-13 01:27:55 +02:00
|
|
|
description = "Email transport module for XMPP";
|
2018-11-14 23:20:04 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2;
|
2009-04-13 01:27:55 +02:00
|
|
|
};
|
|
|
|
}
|