2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, protobuf
|
|
|
|
, rustfmt
|
2023-03-04 12:14:45 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.2.0";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "talaia-labs";
|
|
|
|
repo = "rust-teos";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-UrzH9xmhVq12TcSUQ1AihCG1sNGcy/N8LDsZINVKFkY=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
meta = with lib; {
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://github.com/talaia-labs/rust-teos";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ seberm ];
|
|
|
|
};
|
2023-03-30 22:05:00 +00:00
|
|
|
updateScript = ./update.sh;
|
2022-10-21 18:38:19 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
teos = rustPlatform.buildRustPackage {
|
|
|
|
pname = "teos";
|
2023-03-04 12:14:45 +00:00
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
cargoHash = "sha256-U0imKEPszlBOaS6xEd3kfzy/w2SYe3EY/E1e0L+ViDk=";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildAndTestSubdir = "teos";
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
protobuf
|
|
|
|
rustfmt
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
passthru.updateScript = updateScript;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
meta = meta // {
|
2022-10-21 18:38:19 +00:00
|
|
|
description = "A Lightning watchtower compliant with BOLT13, written in Rust";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
teos-watchtower-plugin = rustPlatform.buildRustPackage {
|
|
|
|
pname = "teos-watchtower-plugin";
|
2023-03-04 12:14:45 +00:00
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
cargoHash = "sha256-3ke1qTFw/4I5dPLuPjIGp1n2C/eRfPB7A6ErMFfwUzE=";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildAndTestSubdir = "watchtower-plugin";
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
protobuf
|
|
|
|
rustfmt
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
passthru.updateScript = updateScript;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = meta // {
|
2022-10-21 18:38:19 +00:00
|
|
|
description = "A Lightning watchtower plugin for clightning";
|
2023-03-04 12:14:45 +00:00
|
|
|
mainProgram = "watchtower-client";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|