1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, configargparse
6, aiohttp
7, async-timeout
8, appdirs
9, readlike
10, requests
11, reparser
12, protobuf
13, urwid
14, mechanicalsoup
15, httpretty
16, pytestCheckHook
17}:
18
19buildPythonPackage rec {
20 pname = "hangups";
21 version = "0.4.18";
22
23 disabled = pythonOlder "3.6";
24
25 src = fetchFromGitHub {
26 owner = "tdryer";
27 repo = "hangups";
28 rev = "v${version}";
29 hash = "sha256-vq1OrOUPMQtezBFlisP2f/bvvYprDjhOuwUcT8rmIvw=";
30 };
31
32 postPatch = ''
33 substituteInPlace setup.py \
34 --replace "protobuf>=3.1.0,<4" "protobuf" \
35 --replace "MechanicalSoup>=0.6.0,<0.13" "MechanicalSoup"
36 '';
37
38 propagatedBuildInputs = [
39 configargparse
40 aiohttp
41 async-timeout
42 appdirs
43 readlike
44 requests
45 reparser
46 protobuf
47 urwid
48 mechanicalsoup
49 ];
50
51 checkInputs = [
52 httpretty
53 pytestCheckHook
54 ];
55
56 pythonImportsCheck = [
57 "hangups"
58 "hangups.client"
59 "hangups.event"
60 "hangups.parsers"
61 "hangups.user"
62 ];
63
64 meta = with lib; {
65 description = "The first third-party instant messaging client for Google Hangouts";
66 homepage = "https://github.com/tdryer/hangups";
67 license = licenses.mit;
68 maintainers = with maintainers; [ dotlambda ];
69 };
70}