8 python-axolotl-curve25519,
15 buildPythonPackage rec {
20 disabled = pythonOlder "3.7";
22 src = fetchFromGitHub {
25 rev = "refs/tags/${version}";
26 hash = "sha256-BhgxLxjKZ4dSL7DqkaoS+wBPCd1SYZomRKrtDLdGmYQ=";
30 # https://github.com/tgalal/consonance/pull/9
32 name = "fix-type-error.patch";
33 url = "https://github.com/tgalal/consonance/pull/9/commits/92fb78af98a18f0533ec8a286136968174fb0baf.patch";
34 hash = "sha256-wVUGxZ4W2zPyrcQPQTc85LcRUtsLbTBVzS10NEolpQY=";
39 # make protobuf compatible with old versions
40 # https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
41 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
44 build-system = [ setuptools ];
48 python-axolotl-curve25519
53 nativeCheckInputs = [ pytestCheckHook ];
55 pytestFlagsArray = [ "tests/test_handshakes_offline.py" ];
57 pythonImportsCheck = [ "consonance" ];
60 description = "WhatsApp's handshake implementation using Noise Protocol";
61 homepage = "https://github.com/tgalal/consonance";
62 license = lib.licenses.gpl3Plus;