mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 15:11:35 +00:00
185fd61631
doBuild and doConfigure are not actually used by any builders, they were probably added by mistake and just confuse people.
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages, runtimeShell } :
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pyIRCt";
|
|
version = "0.4";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/xmpppy/irc-transport-${version}.tar.gz";
|
|
sha256 = "0gbc0dvj1p3088b6x315yjrlwnc5vvzp0var36wlf9z60ghvk8yb";
|
|
};
|
|
|
|
buildInputs = [ pythonPackages.wrapPython ];
|
|
|
|
pythonPath = [
|
|
xmpppy pythonIRClib
|
|
];
|
|
|
|
# phaseNames = ["deploy" (a.makeManyWrappers "$out/share/${name}/irc.py" a.pythonWrapperArguments)];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/share/${pname}-${version}
|
|
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}
|
|
cat > $out/bin/pyIRCt <<EOF
|
|
#!${runtimeShell}
|
|
cd $out/share/${pname}-${version}
|
|
./irc.py \"$@\"
|
|
EOF
|
|
chmod a+rx $out/bin/pyIRCt $out/share/${pname}-${version}/irc.py
|
|
wrapPythonPrograms
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "IRC transport module for XMPP";
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|