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