2017-11-11 08:35:50 +00:00
|
|
|
{ buildPythonPackage, stdenv, fetchFromGitHub, six, python-axolotl, pytest
|
|
|
|
, isPy3k
|
|
|
|
}:
|
2017-10-14 09:54:59 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yowsup";
|
2018-05-03 13:35:51 +00:00
|
|
|
version = "2.5.7";
|
2017-10-14 09:54:59 +00:00
|
|
|
|
2018-05-03 13:35:51 +00:00
|
|
|
# The Python 2.x support of this package is incompatible with `six==1.11`:
|
|
|
|
# https://github.com/tgalal/yowsup/issues/2416#issuecomment-365113486
|
2017-11-11 08:35:50 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2017-10-14 09:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tgalal";
|
|
|
|
repo = "yowsup";
|
|
|
|
rev = "v${version}";
|
2018-05-03 13:35:51 +00:00
|
|
|
sha256 = "1p0hdj5x38v2cxjnhdnqcnp5g7la57mbi365m0z83wa01x2n73w6";
|
2017-10-14 09:54:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) py.test yowsup
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [ ./argparse-dependency.patch ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six python-axolotl ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/tgalal/yowsup";
|
|
|
|
description = "The python WhatsApp library";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|