2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "merkletools";
|
|
|
|
version = "1.0.3";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tierion";
|
|
|
|
repo = "pymerkletools";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-pd7Wxi7Sk95RcrFOTOtl725nIXidva3ftdKSGxHYPTA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
# pysha3 is deprecated and not needed for Python > 3.6
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "install_requires=install_requires" "install_requires=[],"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "merkletools" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python tools for creating Merkle trees, generating Merkle proofs, and verification of Merkle proofs";
|
|
|
|
homepage = "https://github.com/Tierion/pymerkletools";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/Tierion/pymerkletools/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ Madouura ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|