2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages, runtimeShell } :
|
2016-01-24 15:50:54 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pyIRCt";
|
2016-01-24 15:50:54 +00:00
|
|
|
version = "0.4";
|
2009-04-13 00:27:55 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 02:17:07 +01:00
|
|
|
url = "mirror://sourceforge/xmpppy/irc-transport-${version}.tar.gz";
|
2009-04-13 00:27:55 +01:00
|
|
|
sha256 = "0gbc0dvj1p3088b6x315yjrlwnc5vvzp0var36wlf9z60ghvk8yb";
|
|
|
|
};
|
|
|
|
|
2016-01-24 15:50:54 +00:00
|
|
|
buildInputs = [ pythonPackages.wrapPython ];
|
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
xmpppy pythonIRClib
|
|
|
|
];
|
2009-04-13 00:27:55 +01:00
|
|
|
|
2016-01-24 15:50:54 +00:00
|
|
|
# phaseNames = ["deploy" (a.makeManyWrappers "$out/share/${name}/irc.py" a.pythonWrapperArguments)];
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-15 13:41:18 +01:00
|
|
|
mkdir -p $out/bin $out/share/${pname}-${version}
|
2016-01-24 15:50:54 +00:00
|
|
|
sed -e 's@/usr/bin/@${python}/bin/@' -i irc.py
|
2009-04-13 00:27:55 +01: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
|
2019-08-15 13:41:18 +01:00
|
|
|
cp * $out/share/${pname}-${version}
|
2016-01-24 15:50:54 +00:00
|
|
|
cat > $out/bin/pyIRCt <<EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2019-08-15 13:41:18 +01:00
|
|
|
cd $out/share/${pname}-${version}
|
2016-01-24 15:50:54 +00:00
|
|
|
./irc.py \"$@\"
|
|
|
|
EOF
|
2019-08-15 13:41:18 +01:00
|
|
|
chmod a+rx $out/bin/pyIRCt $out/share/${pname}-${version}/irc.py
|
2016-01-24 15:50:54 +00:00
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
2015-09-15 05:27:19 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2009-04-13 00:27:55 +01:00
|
|
|
description = "IRC transport module for XMPP";
|
2018-11-14 22:20:04 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2;
|
2009-04-13 00:27:55 +01:00
|
|
|
};
|
|
|
|
}
|