1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, dissononce
5, python-axolotl-curve25519
6, transitions
7, protobuf
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "consonance";
14 version = "0.1.5";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "tgalal";
21 repo = "consonance";
22 rev = version;
23 hash = "sha256-BhgxLxjKZ4dSL7DqkaoS+wBPCd1SYZomRKrtDLdGmYQ=";
24 };
25
26 propagatedBuildInputs = [
27 dissononce
28 python-axolotl-curve25519
29 transitions
30 protobuf
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 pytestFlagsArray = [
38 "tests/test_handshakes_offline.py"
39 ];
40
41 pythonImportsCheck = [
42 "consonance"
43 ];
44
45 meta = with lib; {
46 description = "WhatsApp's handshake implementation using Noise Protocol";
47 homepage = "https://github.com/tgalal/consonance";
48 license = licenses.gpl3Plus;
49 maintainers = with maintainers; [ ];
50 };
51}