From d6cb65fbdeb5ae97bdd8978557925d2d79132747 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 18 Dec 2022 19:40:19 +0100 Subject: [PATCH] clightning: fix Python packages Patching `pyln-proto` to use cryptography 38 lets us avoid adding many older Python pkg versions. The backwards incompatible changes from cryptography 36 to 38 only include the removal of deprecated fns that pyln-proto doesn't use. See string "BACKWARDS INCOMPATIBLE" in https://cryptography.io/en/latest/changelog/ --- pkgs/clightning-plugins/default.nix | 2 +- pkgs/python-packages/pyln-proto/default.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/clightning-plugins/default.nix b/pkgs/clightning-plugins/default.nix index 5f2e35b..b731c05 100644 --- a/pkgs/clightning-plugins/default.nix +++ b/pkgs/clightning-plugins/default.nix @@ -31,7 +31,7 @@ let description = "Lightning node exporter for the prometheus timeseries server"; extraPkgs = [ prometheus_client ]; patchRequirements = - "--replace prometheus-client==0.6.0 prometheus-client==0.13.1" + "--replace prometheus-client==0.6.0 prometheus-client==0.15.0" + " --replace pyln-client~=0.9.3 pyln-client~=22.11rc1"; }; rebalance = { diff --git a/pkgs/python-packages/pyln-proto/default.nix b/pkgs/python-packages/pyln-proto/default.nix index 29ee61a..4dc21a9 100644 --- a/pkgs/python-packages/pyln-proto/default.nix +++ b/pkgs/python-packages/pyln-proto/default.nix @@ -27,4 +27,8 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto"; + + postPatch = '' + sed -i 's|cryptography = "^36.0.1"|cryptography = "^38.0.0"|' pyproject.toml + ''; }