2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
isPyPy,
|
|
|
|
isPy3k,
|
|
|
|
setuptools,
|
|
|
|
click,
|
|
|
|
gmpy2,
|
|
|
|
pytestCheckHook,
|
|
|
|
numpy,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "phe";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.5.1";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# https://github.com/data61/python-paillier/issues/51
|
|
|
|
disabled = isPyPy || !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "data61";
|
|
|
|
repo = "python-paillier";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-P//4ZL4+2zcB5sWvujs2N0CHFz+EBLERWrPGLLHj6CY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
click
|
|
|
|
gmpy2 # optional, but major speed improvement
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
numpy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for Partially Homomorphic Encryption in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pheutil";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/data61/python-paillier";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [ tomasajt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|