From 486f385fddff51a698844dcdd4e3b4775e9c47d4 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Fri, 16 Oct 2020 13:46:01 +0000 Subject: [PATCH] lightning-loop: 0.9.0 -> 0.10.0 Includes macaroon authentication --- modules/lightning-loop.nix | 7 +++++-- pkgs/lightning-loop/default.nix | 6 +++--- pkgs/lightning-loop/get-sha256.sh | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/lightning-loop.nix b/modules/lightning-loop.nix index af2a2fb..338bc7c 100644 --- a/modules/lightning-loop.nix +++ b/modules/lightning-loop.nix @@ -6,9 +6,10 @@ let cfg = config.services.lightning-loop; inherit (config) nix-bitcoin-services; secretsDir = config.nix-bitcoin.secretsDir; + network = config.services.bitcoind.network; configFile = builtins.toFile "loop.conf" '' datadir=${cfg.dataDir} - network=${config.services.bitcoind.network} + network=${network} logdir=${cfg.dataDir}/logs tlscertpath=${secretsDir}/loop-cert tlskeypath=${secretsDir}/loop-key @@ -50,7 +51,9 @@ in { }; cli = mkOption { default = pkgs.writeScriptBin "loop" '' - ${cfg.cliExec} ${cfg.package}/bin/loop --tlscertpath ${secretsDir}/loop-cert "$@" + ${cfg.cliExec} ${cfg.package}/bin/loop \ + --macaroonpath '${cfg.dataDir}/${network}/loop.macaroon' \ + --tlscertpath '${secretsDir}/loop-cert' "$@" ''; description = "Binary to connect with the lightning-loop instance."; }; diff --git a/pkgs/lightning-loop/default.nix b/pkgs/lightning-loop/default.nix index 5d1ad07..0ce318a 100644 --- a/pkgs/lightning-loop/default.nix +++ b/pkgs/lightning-loop/default.nix @@ -2,17 +2,17 @@ buildGoModule rec { pname = "lightning-loop"; - version = "0.9.0-beta"; + version = "0.10.0-beta"; src = fetchurl { url = "https://github.com/lightninglabs/loop/archive/v${version}.tar.gz"; # Use ./get-sha256.sh to fetch latest (verified) sha256 - sha256 = "82f7c1c0c1d2ddec59c7c5e0780ae645f97ecdaca00b397cd533b27db7a6b7ca"; + sha256 = "2c43168c72a064813427a55adb5bbb9a9aafe508d3921fc875418047bc0972a1"; }; subPackages = [ "cmd/loop" "cmd/loopd" ]; - vendorSha256 = "1dmiiyp38biyrlmwxbrh3k8w7mxv0lsvf5qnzjrrxy6qbmglmk0l"; + vendorSha256 = "030km5fsz1x6zl93krc0nz0d9krnhqakk353b60wni5ynkgqgp3j"; meta = with lib; { description = " Lightning Loop: A Non-Custodial Off/On Chain Bridge"; diff --git a/pkgs/lightning-loop/get-sha256.sh b/pkgs/lightning-loop/get-sha256.sh index cfadcab..1ae79f2 100755 --- a/pkgs/lightning-loop/get-sha256.sh +++ b/pkgs/lightning-loop/get-sha256.sh @@ -14,8 +14,6 @@ echo "Latest release is ${latest}" # GPG verification export GNUPGHOME=$TMPDIR -echo "Fetching Joost Jager's Key" -gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys D146D0F68939436268FA9A130E26BB61B76C4D3A 2> /dev/null echo "Fetching Alex Bosworth's Key" gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys DE23E73BFA8A0AD5587D2FCDE80D2F3F311FD87E 2> /dev/null