add clightning python pkgs
This commit is contained in:
parent
1a16e55237
commit
e62e163177
@ -6,7 +6,6 @@ let self = {
|
||||
electrs = pkgs.callPackage ./electrs { };
|
||||
elementsd = pkgs.callPackage ./elementsd { withGui = false; };
|
||||
hwi = pkgs.callPackage ./hwi { };
|
||||
pylightning = pkgs.python3Packages.callPackage ./pylightning { };
|
||||
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
|
||||
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; };
|
||||
generate-secrets = pkgs.callPackage ./generate-secrets { };
|
||||
|
@ -1,11 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pylightning";
|
||||
version = "0.0.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0anbixqsfk0dsm790yy21f403lwgalxaqlm1s101ifppmxqccgpi";
|
||||
};
|
||||
}
|
@ -4,6 +4,7 @@ let
|
||||
inherit (self) callPackage;
|
||||
|
||||
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
|
||||
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
|
||||
in {
|
||||
bencoderpyx = callPackage ./bencoderpyx {};
|
||||
coincurve = callPackage ./coincurve {};
|
||||
@ -16,4 +17,8 @@ in {
|
||||
joinmarketclient = joinmarketPkg ./jmclient;
|
||||
joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
|
||||
joinmarketdaemon = joinmarketPkg ./jmdaemon;
|
||||
|
||||
pyln-client = clightningPkg ./pyln-client;
|
||||
pyln-proto = clightningPkg ./pyln-proto;
|
||||
pylightning = clightningPkg ./pylightning;
|
||||
}
|
||||
|
17
pkgs/python-packages/pylightning/default.nix
Normal file
17
pkgs/python-packages/pylightning/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ buildPythonPackage, clightning, pyln-client }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pylightning";
|
||||
version = "0.8.0"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py
|
||||
|
||||
inherit (clightning) src;
|
||||
|
||||
propagatedBuildInputs = [ pyln-client ];
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}";
|
||||
|
||||
# The clightning source contains pyln-client 0.8.0
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt --replace pyln-client==0.7.3 pyln-client==0.8.0
|
||||
'';
|
||||
}
|
12
pkgs/python-packages/pyln-client/default.nix
Normal file
12
pkgs/python-packages/pyln-client/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ buildPythonPackage, clightning, recommonmark }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyln-client";
|
||||
version = "0.8.0"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py
|
||||
|
||||
inherit (clightning) src;
|
||||
|
||||
propagatedBuildInputs = [ recommonmark ];
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}";
|
||||
}
|
31
pkgs/python-packages/pyln-proto/default.nix
Normal file
31
pkgs/python-packages/pyln-proto/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ buildPythonPackage, clightning
|
||||
, bitstring
|
||||
, cryptography
|
||||
, coincurve
|
||||
, base58
|
||||
, mypy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyln-proto";
|
||||
version = "0.8.4"; # defined in ${src}/contrib/pyln-proto/setup.py
|
||||
|
||||
inherit (clightning) src;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
bitstring
|
||||
cryptography
|
||||
coincurve
|
||||
base58
|
||||
mypy
|
||||
];
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace base58==1.0.2 base58==2.0.1 \
|
||||
--replace bitstring==3.1.6 bitstring==3.1.5 \
|
||||
--replace cryptography==2.8 cryptography==3.1
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user