1{
2 lib,
3 bitcoinlib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 git,
7 gitpython,
8 pycryptodomex,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "opentimestamps";
15 version = "0.4.5";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "opentimestamps";
22 repo = "python-opentimestamps";
23 rev = "python-opentimestamps-v${version}";
24 hash = "sha256-clG/5NAPmmmoj4b3LdVwl58DHg1EFMIMu+erx+GT+NE=";
25 };
26
27 propagatedBuildInputs = [
28 bitcoinlib
29 gitpython
30 pycryptodomex
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 # Remove a failing test which expects the test source file to reside in the
36 # project's Git repo
37 postPatch = ''
38 rm opentimestamps/tests/core/test_git.py
39 '';
40
41 pythonImportsCheck = [ "opentimestamps" ];
42
43 meta = with lib; {
44 description = "Create and verify OpenTimestamps proofs";
45 homepage = "https://github.com/opentimestamps/python-opentimestamps";
46 changelog = "https://github.com/opentimestamps/python-opentimestamps/releases/tag/python-opentimestamps-v${version}";
47 license = licenses.lgpl3Plus;
48 maintainers = with maintainers; [ erikarvstedt ];
49 };
50}