nixpkgs/pkgs/development/python-modules/yowsup/default.nix
Alexis Hildebrandt f8c4a98e8e treewide: Remove the definite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
2024-06-09 23:08:46 +02:00

56 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
isPy3k,
fetchFromGitHub,
appdirs,
consonance,
protobuf,
python-axolotl,
six,
pyasyncore,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "yowsup";
version = "3.3.0";
format = "setuptools";
# 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 "==" ">=" \
'';
nativeCheckInputs = [ pytestCheckHook ];
propagatedBuildInputs = [
appdirs
consonance
protobuf
python-axolotl
six
] ++ lib.optionals (!pythonOlder "3.12") [ pyasyncore ];
meta = with lib; {
homepage = "https://github.com/tgalal/yowsup";
description = "Python WhatsApp library";
mainProgram = "yowsup-cli";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ];
};
}