1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 gnupg,
6 setuptools,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "pycoin";
12 version = "0.92.20230326";
13 format = "setuptools";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-DYXwATRHw1ay9swLuQOtB+5LcoBe4TtAKWzQgxESwN8=";
18 };
19
20 propagatedBuildInputs = [ setuptools ];
21
22 postPatch = ''
23 substituteInPlace ./pycoin/cmds/tx.py --replace '"gpg"' '"${gnupg}/bin/gpg"'
24 '';
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 dontUseSetuptoolsCheck = true;
29
30 # Disable tests depending on online services
31 disabledTests = [
32 "ServicesTest"
33 "test_tx_pay_to_opcode_list_txt"
34 "test_tx_fetch_unspent"
35 "test_tx_with_gpg"
36 ];
37
38 meta = with lib; {
39 description = "Utilities for Bitcoin and altcoin addresses and transaction manipulation";
40 homepage = "https://github.com/richardkiss/pycoin";
41 license = licenses.mit;
42 maintainers = with maintainers; [ nyanloutre ];
43 };
44}