mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 00:22:13 +00:00
cf50edf583
The latest update of `yowsup` (https://github.com/tgalal/yowsup/releases/tag/v2.5.7) contains the following fixes: * Updated tokens * Fixed tgalal/yowsup#1842: Bug in protocol_groups RemoveGroupsNotificationProtocolEntity * Other minor bug fixes The `argparse-dependency.patch` required a rebase onto the latest version of `setup.py` and ensures that `argparse` won't be needed as extra dependency as our `python3` package ships `argparse` by default. A short note to Python 2 support: the actual issue related to Python 2.x support has been resolved (https://github.com/tgalal/yowsup/issues/2325#issuecomment-354533727), however this relies on `six==1.10` which isn't support by `nixpkgs` as `six` has been bumped to `1.11`. When trying to inject a patched version of our `six` package based on `six==1.10` you'll run into issues with duplicated libraries in your closure as further build dependencies (`pytest` in this case) use the latest `six` version. As Python 2.7 will die in 2020 (https://pythonclock.org/) and patching around in the dependencies of `pytest` to get `yowsup` running isn't worth the effort in my opinion I decided to keep the Python 2.x build disabled for now.
36 lines
893 B
Nix
36 lines
893 B
Nix
{ buildPythonPackage, stdenv, fetchFromGitHub, six, python-axolotl, pytest
|
|
, isPy3k
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "yowsup";
|
|
version = "2.5.7";
|
|
|
|
# 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}";
|
|
sha256 = "1p0hdj5x38v2cxjnhdnqcnp5g7la57mbi365m0z83wa01x2n73w6";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|