@@ -0,0 +1,30 @@
1+{ buildPythonPackage, stdenv, fetchFromGitHub, six, python-axolotl, pytest }:
2+
3+buildPythonPackage rec {
4+ name = "${pname}-${version}";
5+ pname = "yowsup";
6+ version = "2.5.2";
7+
8+ src = fetchFromGitHub {
9+ owner = "tgalal";
10+ repo = "yowsup";
11+ rev = "v${version}";
12+ sha256 = "16l8jmr32wwvl11m0a4r4id3dkfqj2n7dn6gky1077xwmj2da4fl";
13+ };
14+
15+ checkInputs = [ pytest ];
16+ checkPhase = ''
17+ HOME=$(mktemp -d) py.test yowsup
18+ '';
19+
20+ patches = [ ./argparse-dependency.patch ];
21+
22+ propagatedBuildInputs = [ six python-axolotl ];
23+
24+ meta = with stdenv.lib; {
25+ homepage = "https://github.com/tgalal/yowsup";
26+ description = "The python WhatsApp library";
27+ license = licenses.gpl3;
28+ maintainers = with maintainers; [ ma27 ];
29+ };
30+}