1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "merkletools";
10 version = "1.0.3";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "Tierion";
17 repo = "pymerkletools";
18 rev = "refs/tags/${version}";
19 hash = "sha256-pd7Wxi7Sk95RcrFOTOtl725nIXidva3ftdKSGxHYPTA=";
20 };
21
22 postPatch = ''
23 # pysha3 is deprecated and not needed for Python > 3.6
24 substituteInPlace setup.py \
25 --replace "install_requires=install_requires" "install_requires=[],"
26 '';
27
28 checkInputs = [
29 pytestCheckHook
30 ];
31
32 pythonImportsCheck = [
33 "merkletools"
34 ];
35
36 meta = with lib; {
37 description = "Python tools for creating Merkle trees, generating Merkle proofs, and verification of Merkle proofs";
38 homepage = "https://github.com/Tierion/pymerkletools";
39 changelog = "https://github.com/Tierion/pymerkletools/releases/tag/${version}";
40 license = licenses.mit;
41 maintainers = with maintainers; [ Madouura ];
42 };
43}