1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 gnupg,
6 setuptools,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "pycoin";
12 version = "0.92.20241201";
13 format = "setuptools";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-bpN74YFXPM8Cs1BkhEvsRt4TA4a0Xz3xltMHSox5BRI=";
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 # Disable tests depending on online services
29 disabledTests = [
30 "ServicesTest"
31 "test_tx_pay_to_opcode_list_txt"
32 "test_tx_fetch_unspent"
33 "test_tx_with_gpg"
34 ];
35
36 meta = with lib; {
37 description = "Utilities for Bitcoin and altcoin addresses and transaction manipulation";
38 homepage = "https://github.com/richardkiss/pycoin";
39 license = licenses.mit;
40 maintainers = with maintainers; [ nyanloutre ];
41 };
42}