nixpkgs-suyu/pkgs/servers/xmpp/pyIRCt/default.nix

42 lines
1.3 KiB
Nix
Raw Normal View History

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