clightning-plugins/prometheus: fix patch not being applied

`patchPhase` can't be used with `buildCommand`.
This commit is contained in:
Erik Arvstedt 2023-06-09 14:40:32 +02:00
parent e3190b244f
commit 1b741c7cc1
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -3,6 +3,7 @@ pkgs: nbPython3Packages:
let
inherit (pkgs) lib;
src = pkgs.applyPatches {
src = pkgs.fetchFromGitHub {
owner = "lightningd";
repo = "plugins";
@ -10,7 +11,17 @@ let
sha256 = "0ry6gxp9gqpzpdjykx0a5q53saai5jydwvcy6smsh0f5dmjl8srh";
};
version = builtins.substring 0 7 src.rev;
patches = [
# https://github.com/lightningd/plugins/pull/451
(pkgs.fetchpatch {
name = "202305-prometheus-msat-purge";
url = "https://github.com/lightningd/plugins/commit/f8a27b97a1b9ded8790c1f033b1f4268c0a6e210.patch";
sha256 = "sha256-0lFMhHHIi9bUU0+xaHhpnascNlFmr51JxE6e2F0s0zc=";
})
];
};
version = builtins.substring 0 7 src.src.rev;
plugins = with nbPython3Packages; {
currencyrate = {
@ -33,14 +44,6 @@ let
patchRequirements =
"--replace prometheus-client==0.6.0 prometheus-client==0.15.0"
+ " --replace pyln-client~=0.9.3 pyln-client~=23.02";
patches = [
# https://github.com/lightningd/plugins/pull/451
(pkgs.fetchpatch {
name = "202305-prometheus-msat-purge";
url = "https://github.com/lightningd/plugins/commit/f8a27b97a1b9ded8790c1f033b1f4268c0a6e210.patch";
sha256 = "sha256-0lFMhHHIi9bUU0+xaHhpnascNlFmr51JxE6e2F0s0zc=";
})
];
};
rebalance = {
description = "Keeps your channels balanced";
@ -82,8 +85,6 @@ let
patchShebangs '${script}'
'';
patches = plugin.patches or [];
passthru.path = "${drv}/${script}";
meta = with lib; {