summary refs log tree commit diff
path: root/pkgs/development/python-modules/yowsup/default.nix
blob: 0436fe8a0f00e8db8beef19d2dd7afeb9b55d497 (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
{ buildPythonPackage, stdenv, fetchFromGitHub, six, python-axolotl, pytest
, isPy3k, consonance, appdirs
}:

buildPythonPackage rec {
  pname = "yowsup";
  version = "3.2.3";

  # 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 = "0wb8yl685nr1i3vx89hwan5m6a482x8g48f5ksvdlph538p720pm";
  };

  checkInputs = [ pytest ];
  checkPhase = ''
    HOME=$(mktemp -d) py.test yowsup
  '';

  patches = [ ./dependency-fixes.patch ];

  propagatedBuildInputs = [ six python-axolotl consonance appdirs ];

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