depot/third_party/nixpkgs/pkgs/development/python-modules/yowsup/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

52 lines
1,021 B
Nix

{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, appdirs
, consonance
, protobuf
, python-axolotl
, six
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "yowsup";
version = "3.3.0";
# 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 = "1pz0r1gif15lhzdsam8gg3jm6zsskiv2yiwlhaif5rl7lv3p0v7q";
};
postPatch = ''
substituteInPlace setup.py \
--replace "argparse" "" \
--replace "==" ">=" \
'';
checkInputs = [
pytestCheckHook
];
propagatedBuildInputs = [
appdirs
consonance
protobuf
python-axolotl
six
];
meta = with lib; {
homepage = "https://github.com/tgalal/yowsup";
description = "The python WhatsApp library";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}