2016-01-24 15:50:54 +00:00
|
|
|
{ stdenv, python, xmpppy, pythonPackages, fetchcvs } :
|
2009-04-12 23:27:55 +00:00
|
|
|
|
2016-01-24 15:50:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pyMAILt-${version}";
|
|
|
|
version = "20090101";
|
|
|
|
|
|
|
|
src = fetchcvs {
|
2009-04-12 23:27:55 +00:00
|
|
|
cvsRoot = ":pserver:anonymous@xmpppy.cvs.sourceforge.net:/cvsroot/xmpppy";
|
|
|
|
module = "xmpppy/mail-transport";
|
|
|
|
date = "2009-01-01";
|
|
|
|
sha256 = "15301252e52b4ccb2156baefed8982a2a0cce3ae8eae3caf3cc28dfa615c8d6e";
|
|
|
|
};
|
|
|
|
|
2016-01-24 15:50:54 +00:00
|
|
|
pythonPath = [ xmpppy ];
|
|
|
|
buildInputs = [ pythonPackages.wrapPython ];
|
2009-04-12 23:27:55 +00:00
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2016-01-24 15:50:54 +00:00
|
|
|
installPhase = ''
|
2009-04-12 23:27:55 +00:00
|
|
|
cd mail-transport
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin $out/share/${name}
|
2016-01-24 15:50:54 +00:00
|
|
|
sed -e 's@/usr/bin/@${python}/bin/@' -i mail.py
|
2009-04-12 23:27:55 +00: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 15:50:54 +00:00
|
|
|
cat > $out/bin/pyMAILt <<EOF
|
|
|
|
#! /bin/sh
|
|
|
|
cd $out/share/${name}
|
|
|
|
./mail.py \"$@\"
|
|
|
|
EOF
|
2009-04-12 23:27:55 +00:00
|
|
|
chmod a+rx $out/bin/pyMAILt $out/share/${name}/mail.py
|
2016-01-24 15:50:54 +00:00
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
2015-09-15 04:27:19 +00:00
|
|
|
|
2009-04-12 23:27:55 +00:00
|
|
|
meta = {
|
|
|
|
description = "Email transport module for XMPP";
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-04-12 23:27:55 +00:00
|
|
|
};
|
|
|
|
}
|