Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, poetry-core
6, APScheduler
7, bitstring
8, cffi
9, ecdsa
10, monero
11, pypng
12, pyqrcode
13, pyramid
14, pyramid_jinja2
15, pysocks
16, requests
17, tzlocal
18, waitress
19, yoyo-migrations
20, pytestCheckHook
21, pytest-cov
22, webtest
23}:
24
25buildPythonPackage rec {
26 pname = "cypherpunkpay";
27 version = "1.0.16";
28 format = "pyproject";
29
30 src = fetchFromGitHub {
31 owner = "CypherpunkPay";
32 repo = "CypherpunkPay";
33 rev = "refs/tags/v${version}";
34 sha256 = "sha256-X0DB0PVwR0gRnt3jixFzglWAOPKBMvqTOG6pK6OJ03w=";
35 };
36
37 postPatch = ''
38 substituteInPlace pyproject.toml \
39 --replace "bitstring = '^3.1.9'" "bitstring = '>=3.1.9'" \
40 --replace 'cffi = "1.15.0"' 'cffi = ">=1.15.0"' \
41 --replace 'ecdsa = "^0.17.0"' 'ecdsa = ">=0.17.0"' \
42 --replace 'pypng = "^0.0.20"' 'pypng = ">=0.0.20"' \
43 --replace 'tzlocal = "2.1"' 'tzlocal = ">=2.1"'
44 '';
45
46 nativeBuildInputs = [
47 poetry-core
48 ];
49
50 propagatedBuildInputs = [
51 APScheduler
52 bitstring
53 cffi
54 ecdsa
55 monero
56 pypng
57 pyqrcode
58 pyramid
59 pyramid_jinja2
60 pysocks
61 requests
62 tzlocal
63 waitress
64 yoyo-migrations
65 ];
66
67 checkInputs = [
68 pytestCheckHook
69 pytest-cov
70 webtest
71 ];
72
73 disabledTestPaths = [
74 # performance test
75 "tests/unit/tools/pbkdf2_test.py"
76 # tests require network connection
77 "tests/network/explorers/bitcoin"
78 "tests/network/monero/monero_address_transactions_db_test.py"
79 "tests/network/net/http_client"
80 "tests/network/prices"
81 # tests require bitcoind running
82 "tests/network/full_node_clients"
83 # tests require lnd running
84 "tests/network/ln"
85 # tests require tor running
86 "tests/network/monero/monero_test.py"
87 "tests/network/net/tor_client"
88 "tests/network/usecases/calc_monero_address_credits_uc_test.py"
89 "tests/network/usecases/fetch_monero_txs_from_open_node_uc_test.py"
90 # tests require the full environment running
91 "tests/acceptance/views"
92 "tests/acceptance/views_admin"
93 "tests/acceptance/views_donations"
94 "tests/acceptance/views_dummystore"
95 ];
96
97 meta = with lib; {
98 description = "Modern self-hosted software for accepting Bitcoin";
99 homepage = "https://cypherpunkpay.org";
100 license = with licenses; [ mit /* or */ unlicense ];
101 maintainers = with maintainers; [ prusnak ];
102 };
103}