mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
Merge pull request #219088 from figsoda/teos
This commit is contained in:
commit
cf1f395e1e
File diff suppressed because it is too large
Load Diff
@ -1,77 +1,80 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, llvmPackages
|
||||
, openssl
|
||||
, perl
|
||||
, protobuf
|
||||
, rustfmt
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
, stdenv
|
||||
, darwin
|
||||
, pkg-config
|
||||
, openssl
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.1.2";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "talaia-labs";
|
||||
repo = "rust-teos";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-N+srREYsADMTqz3uDXpeCuXrZZ62FopXO7DClGfyk9U=";
|
||||
hash = "sha256-UrzH9xmhVq12TcSUQ1AihCG1sNGcy/N8LDsZINVKFkY=";
|
||||
};
|
||||
|
||||
common.meta = with lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/talaia-labs/rust-teos";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ seberm ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
cargoPatches = [ ./add-cargo-lock.patch ];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl # used by openssl-sys to configure
|
||||
protobuf
|
||||
rustfmt
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
in
|
||||
{
|
||||
teos = rustPlatform.buildRustPackage {
|
||||
pname = "teos";
|
||||
cargoSha256 = "sha256-7VYYYSMJ2JP1KuA8sD0X3wInubH/jbA/sgzsTsomyEc=";
|
||||
inherit version src;
|
||||
|
||||
cargoHash = "sha256-U0imKEPszlBOaS6xEd3kfzy/w2SYe3EY/E1e0L+ViDk=";
|
||||
|
||||
buildAndTestSubdir = "teos";
|
||||
|
||||
inherit version src cargoPatches buildInputs nativeBuildInputs;
|
||||
nativeBuildInputs = [
|
||||
protobuf
|
||||
rustfmt
|
||||
];
|
||||
|
||||
meta = common.meta // {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = meta // {
|
||||
description = "A Lightning watchtower compliant with BOLT13, written in Rust";
|
||||
};
|
||||
|
||||
cargoTestFlags = [
|
||||
"--workspace"
|
||||
];
|
||||
};
|
||||
|
||||
teos-watchtower-plugin = rustPlatform.buildRustPackage {
|
||||
pname = "teos-watchtower-plugin";
|
||||
cargoSha256 = "sha256-xL+DiEfgBYJQ1UJm7LAr1/f34pkU8FRl4Seic8MFAlM=";
|
||||
inherit version src;
|
||||
|
||||
cargoHash = "sha256-3ke1qTFw/4I5dPLuPjIGp1n2C/eRfPB7A6ErMFfwUzE=";
|
||||
|
||||
buildAndTestSubdir = "watchtower-plugin";
|
||||
|
||||
inherit version src cargoPatches buildInputs nativeBuildInputs;
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
protobuf
|
||||
rustfmt
|
||||
];
|
||||
|
||||
meta = common.meta // {
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.SystemConfiguration
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = meta // {
|
||||
description = "A Lightning watchtower plugin for clightning";
|
||||
mainProgram = "watchtower-client";
|
||||
};
|
||||
|
||||
# The test is skipped due to following error:
|
||||
# thread 'retrier::tests::test_manage_retry_unreachable' panicked at 'assertion failed:
|
||||
# wt_client.lock().unwrap().towers.get(&tower_id).unwrap().status.is_unreachable()', watchtower-plugin/src/retrier.rs:518:9
|
||||
checkFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "--skip=retrier::tests::test_manage_retry_unreachable" ];
|
||||
};
|
||||
}
|
||||
|
@ -34907,9 +34907,7 @@ with pkgs;
|
||||
|
||||
taro = callPackage ../applications/blockchains/taro { };
|
||||
|
||||
inherit (callPackages ../applications/blockchains/teos {
|
||||
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
|
||||
})
|
||||
inherit (callPackages ../applications/blockchains/teos { })
|
||||
teos
|
||||
teos-watchtower-plugin;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user