2022-04-27 09:35:20 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2023-03-15 16:39:30 +00:00
|
|
|
, apscheduler
|
2022-04-27 09:35:20 +00:00
|
|
|
, bitstring
|
|
|
|
, cffi
|
|
|
|
, ecdsa
|
|
|
|
, monero
|
|
|
|
, pypng
|
|
|
|
, pyqrcode
|
|
|
|
, pyramid
|
|
|
|
, pyramid_jinja2
|
|
|
|
, pysocks
|
|
|
|
, requests
|
|
|
|
, tzlocal
|
|
|
|
, waitress
|
|
|
|
, yoyo-migrations
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-cov
|
|
|
|
, webtest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cypherpunkpay";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.0.16";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CypherpunkPay";
|
|
|
|
repo = "CypherpunkPay";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-X0DB0PVwR0gRnt3jixFzglWAOPKBMvqTOG6pK6OJ03w=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-12-02 08:20:57 +00:00
|
|
|
--replace "bitstring = '^3.1.9'" "bitstring = '>=3.1.9'" \
|
|
|
|
--replace 'cffi = "1.15.0"' 'cffi = ">=1.15.0"' \
|
|
|
|
--replace 'ecdsa = "^0.17.0"' 'ecdsa = ">=0.17.0"' \
|
2022-04-27 09:35:20 +00:00
|
|
|
--replace 'pypng = "^0.0.20"' 'pypng = ">=0.0.20"' \
|
|
|
|
--replace 'tzlocal = "2.1"' 'tzlocal = ">=2.1"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
apscheduler
|
2022-04-27 09:35:20 +00:00
|
|
|
bitstring
|
|
|
|
cffi
|
|
|
|
ecdsa
|
|
|
|
monero
|
|
|
|
pypng
|
|
|
|
pyqrcode
|
|
|
|
pyramid
|
|
|
|
pyramid_jinja2
|
|
|
|
pysocks
|
|
|
|
requests
|
|
|
|
tzlocal
|
|
|
|
waitress
|
|
|
|
yoyo-migrations
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-cov
|
|
|
|
webtest
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# performance test
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/unit/tools/pbkdf2_test.py"
|
2022-04-27 09:35:20 +00:00
|
|
|
# tests require network connection
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/network/explorers/bitcoin"
|
|
|
|
"tests/network/monero/monero_address_transactions_db_test.py"
|
|
|
|
"tests/network/net/http_client"
|
|
|
|
"tests/network/prices"
|
2022-04-27 09:35:20 +00:00
|
|
|
# tests require bitcoind running
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/network/full_node_clients"
|
2022-04-27 09:35:20 +00:00
|
|
|
# tests require lnd running
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/network/ln"
|
2022-04-27 09:35:20 +00:00
|
|
|
# tests require tor running
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/network/monero/monero_test.py"
|
|
|
|
"tests/network/net/tor_client"
|
|
|
|
"tests/network/usecases/calc_monero_address_credits_uc_test.py"
|
|
|
|
"tests/network/usecases/fetch_monero_txs_from_open_node_uc_test.py"
|
2022-04-27 09:35:20 +00:00
|
|
|
# tests require the full environment running
|
2022-12-02 08:20:57 +00:00
|
|
|
"tests/acceptance/views"
|
|
|
|
"tests/acceptance/views_admin"
|
|
|
|
"tests/acceptance/views_donations"
|
|
|
|
"tests/acceptance/views_dummystore"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Modern self-hosted software for accepting Bitcoin";
|
|
|
|
homepage = "https://cypherpunkpay.org";
|
|
|
|
license = with licenses; [ mit /* or */ unlicense ];
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|