From 4875314b6fbf731174e079d0c3d69d62584052df Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sun, 11 Apr 2021 12:39:08 +0000 Subject: [PATCH 1/3] clboss: 0.10 -> 0.11A --- pkgs/clboss/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/clboss/default.nix b/pkgs/clboss/default.nix index cb3eb97..ca7421d 100644 --- a/pkgs/clboss/default.nix +++ b/pkgs/clboss/default.nix @@ -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 ]; From 447606efaf6aeb0525fed0e2d16bf3f9a8897f7a Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sun, 11 Apr 2021 12:39:41 +0000 Subject: [PATCH 2/3] tests: add clboss --- test/tests.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/tests.nix b/test/tests.nix index fa1386a..6a2fcd9 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -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; From 7914405cede7acd6dab53f3e7965557b6d6c8636 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sun, 11 Apr 2021 12:40:37 +0000 Subject: [PATCH 3/3] clboss: add option for using custom package --- modules/clightning-plugins/clboss.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/clightning-plugins/clboss.nix b/modules/clightning-plugins/clboss.nix index 5a01a20..c50c85e 100644 --- a/modules/clightning-plugins/clboss.nix +++ b/modules/clightning-plugins/clboss.nix @@ -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 = [