about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/yowsup/default.nix
blob: 1754dab10d36ba03bea0502042f1e5f76de29a0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, appdirs
, consonance
, protobuf
, python-axolotl
, six
, 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
  ];

  meta = with lib; {
    homepage = "https://github.com/tgalal/yowsup";
    description = "The python WhatsApp library";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ ];
  };
}