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