Merge #351: Update CLBOSS, add test, add option for custom pkg

7914405ced clboss: add option for using custom package (Jonas Nick)
447606efaf tests: add clboss (Jonas Nick)
4875314b6f clboss: 0.10 -> 0.11A (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 7914405ced

Tree-SHA512: ef0918771703eb24c3cae39efcd130d5a55e35d6cefd66fe0506ca6b4c53aef4ebac1dd547f83d0487999d369ded8629505fd0d235ffb393ed52e98c2d5059d0
This commit is contained in:
Jonas Nick 2021-04-13 16:25:30 +00:00
commit c964559a41
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
3 changed files with 14 additions and 6 deletions

View File

@ -12,11 +12,16 @@ let cfg = config.services.clightning.plugins.clboss; in
Specify target amount (in satoshi) that CLBOSS will leave onchain.
'';
};
package = mkOption {
type = types.package;
default = config.nix-bitcoin.pkgs.clboss;
description = "The package providing clboss binaries.";
};
};
config = mkIf cfg.enable {
services.clightning.extraConfig = ''
plugin=${config.nix-bitcoin.pkgs.clboss}/bin/clboss
plugin=${cfg.package}/bin/clboss
clboss-min-onchain=${toString cfg.min-onchain}
'';
systemd.services.clightning.path = [

View File

@ -5,11 +5,11 @@ let
in
stdenv.mkDerivation rec {
pname = "clboss";
version = "0.10";
version = "0.11A";
src = fetchurl {
url = "https://github.com/ZmnSCPxj/clboss/releases/download/v${version}/clboss-${version}.tar.gz";
sha256 = "1bmlpfhsjs046qx2ikln15rj4kal32752zs1s5yjklsq9xwnbciz";
url = "https://github.com/ZmnSCPxj/clboss/releases/download/${version}/clboss-${version}.tar.gz";
sha256 = "1vxa1f3jwlybdca2da73a1fnqy55c4ipwwysvkhy74sw5b4q905g";
};
nativeBuildInputs = [ pkgconfig libev curlWithGnuTLS sqlite ];

View File

@ -47,7 +47,10 @@ let
test.data.clightning-plugins = let
plugins = config.services.clightning.plugins;
enabled = builtins.filter (plugin: plugins.${plugin}.enable) (builtins.attrNames plugins);
pluginPkgs = config.nix-bitcoin.pkgs.clightning-plugins;
nbPkgs = config.nix-bitcoin.pkgs;
pluginPkgs = nbPkgs.clightning-plugins // {
clboss.path = "${nbPkgs.clboss}/bin/clboss";
};
in map (plugin: pluginPkgs.${plugin}.path) enabled;
tests.spark-wallet = cfg.spark-wallet.enable;
@ -95,7 +98,7 @@ let
}
(mkIf config.test.features.clightningPlugins {
services.clightning.plugins = {
# TODO: add clboss when https://github.com/ZmnSCPxj/clboss/issues/49 is closed
clboss.enable = true;
helpme.enable = true;
monitor.enable = true;
prometheus.enable = true;