summary refs log tree commit diff
path: root/pkgs/development/python-modules/opentimestamps/default.nix
blob: e5d37fcfba8dc932a0a1f566e63825ae6630d61a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, bitcoinlib
, buildPythonPackage
, fetchFromGitHub
, git
, gitpython
, pycryptodomex
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "opentimestamps";
  version = "0.4.3";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "opentimestamps";
    repo = "python-opentimestamps";
    rev = "python-opentimestamps-v${version}";
    hash = "sha256-ZTZ7D3NGhO18IxKqTMFBe6pDvqtGR+9w0cgs6VAHtwg=";
  };

  propagatedBuildInputs = [
    bitcoinlib
    gitpython
    pycryptodomex
  ];

  checkInputs = [
    pytestCheckHook
  ];

  # Remove a failing test which expects the test source file to reside in the
  # project's Git repo
  postPatch = ''
    rm opentimestamps/tests/core/test_git.py
  '';

  pythonImportsCheck = [
    "opentimestamps"
  ];

  meta = with lib; {
    description = "Create and verify OpenTimestamps proofs";
    homepage = "https://github.com/opentimestamps/python-opentimestamps";
    changelog = "https://github.com/opentimestamps/python-opentimestamps/releases/tag/python-opentimestamps-v${version}";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ erikarvstedt ];
  };
}