1{
2 lib,
3 stdenv,
4 apscheduler,
5 bitstring,
6 buildPythonPackage,
7 cffi,
8 ecdsa,
9 fetchFromGitHub,
10 monero,
11 poetry-core,
12 pypng,
13 pyqrcode,
14 pyramid,
15 pyramid-jinja2,
16 pysocks,
17 pytestCheckHook,
18 pythonOlder,
19 pythonRelaxDepsHook,
20 requests,
21 tzlocal,
22 waitress,
23 webtest,
24 yoyo-migrations,
25}:
26
27buildPythonPackage rec {
28 pname = "cypherpunkpay";
29 version = "1.0.16";
30 format = "pyproject";
31
32 disabled = pythonOlder "3.7";
33
34 src = fetchFromGitHub {
35 owner = "CypherpunkPay";
36 repo = "CypherpunkPay";
37 rev = "refs/tags/v${version}";
38 hash = "sha256-X0DB0PVwR0gRnt3jixFzglWAOPKBMvqTOG6pK6OJ03w=";
39 };
40
41 pythonRelaxDeps = [
42 "bitstring"
43 "cffi"
44 "ecdsa"
45 "pypng"
46 "tzlocal"
47 "yoyo-migrations"
48 "waitress"
49 ];
50
51 nativeBuildInputs = [
52 poetry-core
53 pythonRelaxDepsHook
54 ];
55
56 propagatedBuildInputs = [
57 apscheduler
58 bitstring
59 cffi
60 ecdsa
61 monero
62 pypng
63 pyqrcode
64 pyramid
65 pyramid-jinja2
66 pysocks
67 requests
68 tzlocal
69 waitress
70 yoyo-migrations
71 ];
72
73 nativeCheckInputs = [
74 pytestCheckHook
75 webtest
76 ];
77
78 pytestFlagsArray = [
79 "-W"
80 "ignore::DeprecationWarning"
81 ];
82
83 disabledTestPaths = [
84 # performance test
85 "tests/unit/tools/pbkdf2_test.py"
86 # tests require network connection
87 "tests/network/explorers/bitcoin"
88 "tests/network/monero/monero_address_transactions_db_test.py"
89 "tests/network/net/http_client"
90 "tests/network/prices"
91 # tests require bitcoind running
92 "tests/network/full_node_clients"
93 # tests require lnd running
94 "tests/network/ln"
95 # tests require tor running
96 "tests/network/monero/monero_test.py"
97 "tests/network/net/tor_client"
98 "tests/network/usecases/calc_monero_address_credits_uc_test.py"
99 "tests/network/usecases/fetch_monero_txs_from_open_node_uc_test.py"
100 # tests require the full environment running
101 "tests/acceptance/views"
102 "tests/acceptance/views_admin"
103 "tests/acceptance/views_donations"
104 "tests/acceptance/views_dummystore"
105 ];
106
107 pythonImportsCheck = [ "cypherpunkpay" ];
108
109 meta = with lib; {
110 description = "Modern self-hosted software for accepting Bitcoin";
111 homepage = "https://github.com/CypherpunkPay/CypherpunkPay";
112 changelog = "https://github.com/CypherpunkPay/CypherpunkPay/releases/tag/v${version}";
113 license = with licenses; [
114 mit # or
115 unlicense
116 ];
117 maintainers = with maintainers; [ prusnak ];
118 };
119}