at master 927 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 isPyPy, 6 isPy3k, 7 setuptools, 8 click, 9 gmpy2, 10 pytestCheckHook, 11 numpy, 12}: 13 14buildPythonPackage rec { 15 pname = "phe"; 16 version = "1.5.1"; 17 pyproject = true; 18 19 # https://github.com/data61/python-paillier/issues/51 20 disabled = isPyPy || !isPy3k; 21 22 src = fetchFromGitHub { 23 owner = "data61"; 24 repo = "python-paillier"; 25 tag = version; 26 hash = "sha256-P//4ZL4+2zcB5sWvujs2N0CHFz+EBLERWrPGLLHj6CY="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ 32 click 33 gmpy2 # optional, but major speed improvement 34 ]; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 numpy 39 ]; 40 41 meta = with lib; { 42 description = "Library for Partially Homomorphic Encryption in Python"; 43 mainProgram = "pheutil"; 44 homepage = "https://github.com/data61/python-paillier"; 45 license = licenses.gpl3; 46 maintainers = with maintainers; [ tomasajt ]; 47 }; 48}