-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #597: Integrate trustedcoin clightning plugin
a3c6547 docs: trustedcoin: add info about possible problems (Otto Sabart) 67f2eb2 trustedcoin: explicitly use the HTTPS_PROXY for external connections (Otto Sabart) 4942130 tests: add tests for trustedcoin clightning plugin (Otto Sabart) 8c00c26 trustedcoin: update to v0.6.1 (Otto Sabart) 5b5e769 trustedcoin: fix shellcheck (Otto Sabart) 3d26f72 clightning-plugins: add trustedcoin (neverupdate) c747ddb readme: reference trustedcoin source (neverupdate) 35fc3a2 trustedcoin: add module (neverupdate) 3197338 trustedcoin: add pkg (neverupdate) Pull request description: ACKs for top commit: jonasnick: ACK a3c6547 Tree-SHA512: 81075d051c500b533ac979530645ccb596c57cf93cf695419eda9f13575863b1cece0cb9a423fc669d96b97a19ba6a49012a1abef310f904df99b90762c5c943
- Loading branch information
Showing
11 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ in { | |
./feeadjuster.nix | ||
./prometheus.nix | ||
./summary.nix | ||
./trustedcoin.nix | ||
./zmq.nix | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
let cfg = config.services.clightning.plugins.trustedcoin; in | ||
{ | ||
options.services.clightning.plugins.trustedcoin = { | ||
enable = mkEnableOption "Trustedcoin (clightning plugin)"; | ||
package = mkOption { | ||
type = types.package; | ||
default = config.nix-bitcoin.pkgs.trustedcoin; | ||
defaultText = "config.nix-bitcoin.pkgs.trustedcoin"; | ||
description = mdDoc "The package providing trustedcoin binaries."; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
services.clightning.extraConfig = '' | ||
plugin=${cfg.package}/bin/trustedcoin | ||
disable-plugin=bcli | ||
''; | ||
|
||
# Trustedcoin does not honor the clightning's proxy configuration. | ||
# Ref.: https://github.com/nbd-wtf/trustedcoin/pull/19 | ||
systemd.services.clightning.environment = mkIf (config.services.clightning.proxy != null) { | ||
HTTPS_PROXY = "socks5://${config.services.clightning.proxy}"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ lib, buildGoModule, fetchFromGitHub }: | ||
|
||
buildGoModule rec { | ||
pname = "trustedcoin"; | ||
version = "0.6.1"; | ||
src = fetchFromGitHub { | ||
owner = "nbd-wtf"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "sha256-UNQjxhAT0mK1In7vUtIoMoMNBV+0wkrwbDmm7m+0R3o="; | ||
}; | ||
|
||
vendorSha256 = "sha256-xvkK9rMQlXTnNyOMd79qxVSvhgPobcBk9cq4/YWbupY="; | ||
|
||
subPackages = [ "." ]; | ||
|
||
meta = with lib; { | ||
description = "Light bitcoin node implementation"; | ||
homepage = "https://github.com/nbd-wtf/trustedcoin"; | ||
maintainers = with maintainers; [ seberm fort-nix ]; | ||
platforms = platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash -p git gnupg curl jq | ||
set -euo pipefail | ||
|
||
|
||
TMPDIR="$(mktemp -d -p /tmp)" | ||
trap 'rm -rf $TMPDIR' EXIT | ||
cd "$TMPDIR" | ||
|
||
echo "Fetching latest release" | ||
repo='nbd-wtf/trustedcoin' | ||
latest=$(curl --location --silent --show-error https://api.github.com/repos/${repo}/releases/latest | jq -r .tag_name) | ||
echo "Latest release is $latest" | ||
git clone --depth 1 --branch "$latest" "https://github.com/${repo}" 2>/dev/null | ||
cd trustedcoin | ||
|
||
echo "tag: $latest" | ||
git checkout -q "tags/$latest" | ||
rm -rf .git | ||
nix --extra-experimental-features nix-command hash path . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters