1{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, isPy3k
2, bitcoinlib, GitPython, pysha3, git }:
3
4buildPythonPackage rec {
5 pname = "opentimestamps";
6 version = "0.4.1";
7 disabled = (!isPy3k);
8
9 # We can't use the pypi source because it doesn't include README.md which is
10 # needed in setup.py
11 src = fetchFromGitHub {
12 owner = "opentimestamps";
13 repo = "python-opentimestamps";
14 rev = "python-opentimestamps-v${version}";
15 sha256 = "0c45ij8absfgwizq6dfgg81siq3y8605sgg184vazp292w8nqmqr";
16 };
17
18 patches = [
19 # build against bitcoinlib-0.11
20 (fetchpatch {
21 url = "https://patch-diff.githubusercontent.com/raw/opentimestamps/python-opentimestamps/pull/43.patch";
22 sha256 = "0bxzk4pzpqk7zrk2x7vn2bj2n3pc5whf8ijbd225s6674q450zbg";
23 })
24 ];
25
26 # Remove a failing test which expects the test source file to reside in the
27 # project's Git repo
28 postPatch = ''
29 rm opentimestamps/tests/core/test_git.py
30 '';
31
32 checkInputs = [ git ];
33 propagatedBuildInputs = [ bitcoinlib GitPython pysha3 ];
34
35 meta = {
36 description = "Create and verify OpenTimestamps proofs";
37 homepage = "https://github.com/opentimestamps/python-opentimestamps";
38 license = lib.licenses.lgpl3;
39 };
40}