clightning-plugins: use clnrest, remove Python version
This commit is contained in:
parent
ac86e67c85
commit
04b6a09be4
3 changed files with 4 additions and 62 deletions
|
|
@ -1,59 +0,0 @@
|
|||
{ buildPythonPackage
|
||||
, clightning
|
||||
, python
|
||||
, poetry-core
|
||||
, flask
|
||||
, flask-cors
|
||||
, flask-restx
|
||||
, flask-socketio
|
||||
, gevent
|
||||
, gevent-websocket
|
||||
, gunicorn
|
||||
, pyln-client
|
||||
, json5
|
||||
, jsonschema
|
||||
}:
|
||||
|
||||
let
|
||||
self = buildPythonPackage rec {
|
||||
pname = "clnrest";
|
||||
version = clightning.version;
|
||||
format = "pyproject";
|
||||
|
||||
inherit (clightning) src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/plugins/clnrest";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'gevent = "^23.9.0.post1"' 'gevent = "24.2.1"' \
|
||||
--replace-fail 'gunicorn = "^21.2.0"' 'gunicorn = "23.0.0"' \
|
||||
--replace-fail 'flask = "^2.3.3"' 'flask = "3.0.3"'
|
||||
|
||||
# Add extra required src files that are missing in pyproject.toml
|
||||
sed -i '/authors/a include = [ { path = "utilities", format = ["sdist", "wheel"] } ]' pyproject.toml
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
|
||||
# From https://github.com/ElementsProject/lightning/blob/master/plugins/clnrest/pyproject.toml
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
flask-cors
|
||||
flask-restx
|
||||
flask-socketio
|
||||
gevent
|
||||
gevent-websocket
|
||||
gunicorn
|
||||
json5
|
||||
pyln-client
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper ${python}/bin/python $out/bin/clnrest \
|
||||
--set NIX_PYTHONPATH ${python.pkgs.makePythonPath self.propagatedBuildInputs} \
|
||||
--add-flags "$out/lib/${python.libPrefix}/site-packages/clnrest.py"
|
||||
'';
|
||||
};
|
||||
in
|
||||
self
|
||||
|
|
@ -10,7 +10,8 @@ rec {
|
|||
pyln-proto = clightningPkg ./pyln-proto;
|
||||
pyln-bolt7 = clightningPkg ./pyln-bolt7;
|
||||
pylightning = clightningPkg ./pylightning;
|
||||
clnrest = clightningPkg ./clnrest;
|
||||
# TODO: Remove after 2026-05-09
|
||||
clnrest = throw "`nbPython3Packages.clnrest` has been replaced with nix-bitcoin pkg `clnrest` (Rust rewrite)";
|
||||
|
||||
# Packages only used by joinmarket
|
||||
bencoderpyx = callPackage ./bencoderpyx {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue