Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 dissononce, 7 python-axolotl-curve25519, 8 transitions, 9 protobuf, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "consonance"; 16 version = "0.1.5"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "tgalal"; 23 repo = "consonance"; 24 rev = version; 25 hash = "sha256-BhgxLxjKZ4dSL7DqkaoS+wBPCd1SYZomRKrtDLdGmYQ="; 26 }; 27 28 patches = [ 29 # https://github.com/tgalal/consonance/pull/9 30 (fetchpatch { 31 name = "fix-type-error.patch"; 32 url = "https://github.com/tgalal/consonance/pull/9/commits/92fb78af98a18f0533ec8a286136968174fb0baf.patch"; 33 hash = "sha256-wVUGxZ4W2zPyrcQPQTc85LcRUtsLbTBVzS10NEolpQY="; 34 }) 35 ]; 36 37 propagatedBuildInputs = [ 38 dissononce 39 python-axolotl-curve25519 40 transitions 41 protobuf 42 ]; 43 44 nativeCheckInputs = [ pytestCheckHook ]; 45 46 pytestFlagsArray = [ "tests/test_handshakes_offline.py" ]; 47 48 pythonImportsCheck = [ "consonance" ]; 49 50 meta = with lib; { 51 description = "WhatsApp's handshake implementation using Noise Protocol"; 52 homepage = "https://github.com/tgalal/consonance"; 53 license = licenses.gpl3Plus; 54 maintainers = [ ]; 55 }; 56}