2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
isPy3k,
|
|
|
|
fetchFromGitHub,
|
|
|
|
appdirs,
|
|
|
|
consonance,
|
|
|
|
protobuf,
|
|
|
|
python-axolotl,
|
|
|
|
six,
|
|
|
|
pyasyncore,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yowsup";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.3.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +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
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tgalal";
|
|
|
|
repo = "yowsup";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "1pz0r1gif15lhzdsam8gg3jm6zsskiv2yiwlhaif5rl7lv3p0v7q";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "argparse" "" \
|
|
|
|
--replace "==" ">=" \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
consonance
|
|
|
|
protobuf
|
|
|
|
python-axolotl
|
|
|
|
six
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (!pythonOlder "3.12") [ pyasyncore ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/tgalal/yowsup";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python WhatsApp library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "yowsup-cli";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|