Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 78 lines 1.5 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 protobuf, 6 rustfmt, 7 pkg-config, 8 openssl, 9}: 10 11let 12 version = "0.2.0"; 13 14 src = fetchFromGitHub { 15 owner = "talaia-labs"; 16 repo = "rust-teos"; 17 rev = "v${version}"; 18 hash = "sha256-UrzH9xmhVq12TcSUQ1AihCG1sNGcy/N8LDsZINVKFkY="; 19 }; 20 21 meta = with lib; { 22 homepage = "https://github.com/talaia-labs/rust-teos"; 23 license = licenses.mit; 24 maintainers = with maintainers; [ seberm ]; 25 }; 26 updateScript = ./update.sh; 27in 28{ 29 teos = rustPlatform.buildRustPackage { 30 pname = "teos"; 31 inherit version src; 32 33 cargoHash = "sha256-lod5I94T4wGwXEDtvh2AyaDYM0byCfaSBP8emKV7+3M="; 34 35 buildAndTestSubdir = "teos"; 36 37 nativeBuildInputs = [ 38 protobuf 39 rustfmt 40 ]; 41 42 passthru.updateScript = updateScript; 43 44 __darwinAllowLocalNetworking = true; 45 46 meta = meta // { 47 description = "Lightning watchtower compliant with BOLT13, written in Rust"; 48 }; 49 }; 50 51 teos-watchtower-plugin = rustPlatform.buildRustPackage { 52 pname = "teos-watchtower-plugin"; 53 inherit version src; 54 55 cargoHash = "sha256-lod5I94T4wGwXEDtvh2AyaDYM0byCfaSBP8emKV7+3M="; 56 57 buildAndTestSubdir = "watchtower-plugin"; 58 59 nativeBuildInputs = [ 60 pkg-config 61 protobuf 62 rustfmt 63 ]; 64 65 buildInputs = [ 66 openssl 67 ]; 68 69 passthru.updateScript = updateScript; 70 71 __darwinAllowLocalNetworking = true; 72 73 meta = meta // { 74 description = "Lightning watchtower plugin for clightning"; 75 mainProgram = "watchtower-client"; 76 }; 77 }; 78}