1{ lib
2, bitcoinlib
3, buildPythonPackage
4, fetchFromGitHub
5, git
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 bitcoinlib
28 gitpython
29 pycryptodomex
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 # Remove a failing test which expects the test source file to reside in the
37 # project's Git repo
38 postPatch = ''
39 rm opentimestamps/tests/core/test_git.py
40 '';
41
42 pythonImportsCheck = [
43 "opentimestamps"
44 ];
45
46 meta = with lib; {
47 description = "Create and verify OpenTimestamps proofs";
48 homepage = "https://github.com/opentimestamps/python-opentimestamps";
49 changelog = "https://github.com/opentimestamps/python-opentimestamps/releases/tag/python-opentimestamps-v${version}";
50 license = licenses.lgpl3Plus;
51 maintainers = with maintainers; [ erikarvstedt ];
52 };
53}