2016-01-24 16:50:54 +01:00
|
|
|
{ stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages } :
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pyIRCt-${version}";
|
|
|
|
version = "0.4";
|
2009-04-13 01:27:55 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 03:17:07 +02:00
|
|
|
url = "mirror://sourceforge/xmpppy/irc-transport-${version}.tar.gz";
|
2009-04-13 01:27:55 +02:00
|
|
|
sha256 = "0gbc0dvj1p3088b6x315yjrlwnc5vvzp0var36wlf9z60ghvk8yb";
|
|
|
|
};
|
|
|
|
|
2016-01-24 16:50:54 +01:00
|
|
|
buildInputs = [ pythonPackages.wrapPython ];
|
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
xmpppy pythonIRClib
|
|
|
|
];
|
2009-04-13 01:27:55 +02:00
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2016-01-24 16:50:54 +01:00
|
|
|
# phaseNames = ["deploy" (a.makeManyWrappers "$out/share/${name}/irc.py" a.pythonWrapperArguments)];
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin $out/share/${name}
|
2016-01-24 16:50:54 +01:00
|
|
|
sed -e 's@/usr/bin/@${python}/bin/@' -i irc.py
|
2009-04-13 01:27:55 +02:00
|
|
|
sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.pyIRCt.xml"]' -i config.py
|
|
|
|
sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.python-irc-transport.xml"]' -i config.py
|
|
|
|
sed -e '/configFiles/iimport os' -i config.py
|
2016-01-24 16:50:54 +01:00
|
|
|
cp * $out/share/${name}
|
|
|
|
cat > $out/bin/pyIRCt <<EOF
|
2017-01-15 13:44:52 +01:00
|
|
|
#!${stdenv.shell}
|
2016-01-24 16:50:54 +01:00
|
|
|
cd $out/share/${name}
|
|
|
|
./irc.py \"$@\"
|
|
|
|
EOF
|
2009-04-13 01:27:55 +02:00
|
|
|
chmod a+rx $out/bin/pyIRCt $out/share/${name}/irc.py
|
2016-01-24 16:50:54 +01:00
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
2015-09-15 06:27:19 +02:00
|
|
|
|
2009-04-13 01:27:55 +02:00
|
|
|
meta = {
|
|
|
|
description = "IRC transport module for XMPP";
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-04-13 01:27:55 +02:00
|
|
|
};
|
|
|
|
}
|