1{ buildPythonPackage, lib, fetchFromGitHub, pytest, dissononce, python-axolotl-curve25519
2, transitions, protobuf, nose, isPy27
3}:
4
5buildPythonPackage rec {
6 pname = "consonance";
7 version = "0.1.3";
8 disabled = isPy27;
9
10 src = fetchFromGitHub {
11 owner = "tgalal";
12 repo = "consonance";
13 rev = version;
14 sha256 = "1ifs0fq6i41rdna1kszv5sf87qbqx1mn98ffyx4xhw4i9r2grrjv";
15 };
16
17 checkInputs = [ nose ];
18 checkPhase = ''
19 # skipping online test as it requires network with uplink
20 nosetests tests/test_handshakes_offline.py
21 '';
22
23 propagatedBuildInputs = [ dissononce python-axolotl-curve25519 transitions protobuf ];
24
25 meta = with lib; {
26 homepage = "https://pypi.org/project/consonance/";
27 license = licenses.gpl3;
28 description = "WhatsApp's handshake implementation using Noise Protocol";
29 };
30}