add clightning python pkgs

This commit is contained in:
Erik Arvstedt 2020-11-12 18:07:39 +01:00 committed by Ian Shipman
parent 1a16e55237
commit e62e163177
6 changed files with 65 additions and 12 deletions

View File

@ -6,7 +6,6 @@ let self = {
electrs = pkgs.callPackage ./electrs { }; electrs = pkgs.callPackage ./electrs { };
elementsd = pkgs.callPackage ./elementsd { withGui = false; }; elementsd = pkgs.callPackage ./elementsd { withGui = false; };
hwi = pkgs.callPackage ./hwi { }; hwi = pkgs.callPackage ./hwi { };
pylightning = pkgs.python3Packages.callPackage ./pylightning { };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { }; liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; }; joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3Packages; };
generate-secrets = pkgs.callPackage ./generate-secrets { }; generate-secrets = pkgs.callPackage ./generate-secrets { };

View File

@ -1,11 +0,0 @@
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "pylightning";
version = "0.0.7";
src = fetchPypi {
inherit pname version;
sha256 = "0anbixqsfk0dsm790yy21f403lwgalxaqlm1s101ifppmxqccgpi";
};
}

View File

@ -4,6 +4,7 @@ let
inherit (self) callPackage; inherit (self) callPackage;
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; }; joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
in { in {
bencoderpyx = callPackage ./bencoderpyx {}; bencoderpyx = callPackage ./bencoderpyx {};
coincurve = callPackage ./coincurve {}; coincurve = callPackage ./coincurve {};
@ -16,4 +17,8 @@ in {
joinmarketclient = joinmarketPkg ./jmclient; joinmarketclient = joinmarketPkg ./jmclient;
joinmarketbitcoin = joinmarketPkg ./jmbitcoin; joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
joinmarketdaemon = joinmarketPkg ./jmdaemon; joinmarketdaemon = joinmarketPkg ./jmdaemon;
pyln-client = clightningPkg ./pyln-client;
pyln-proto = clightningPkg ./pyln-proto;
pylightning = clightningPkg ./pylightning;
} }

View 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
'';
}

View 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}";
}

View 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
'';
}