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