clnrest: init at 0.2.0

This commit is contained in:
Erik Arvstedt 2025-05-08 23:58:27 +02:00
parent 6e3c5db5f5
commit ac86e67c85
No known key found for this signature in database
GPG key ID: 33312B944DD97846
2 changed files with 44 additions and 0 deletions

43
pkgs/clnrest/default.nix Normal file
View file

@ -0,0 +1,43 @@
{
lib,
rustPlatform,
clightning,
unzip,
protobuf,
}:
rustPlatform.buildRustPackage rec {
pname = "clnrest";
version = "0.2.0";
inherit (clightning) src;
cargoHash = "sha256-rXOpRNzIDohfvn3n1xEhc/C1pCpzgfFXHjob7/qOeXM=";
depsExtraArgs = {
nativeBuildInputs = [ unzip ];
# Don't run `configure` of the main project build
dontConfigure = true;
};
nativeBuildInputs = [
# For unpacking the src
unzip
];
cargoBuildFlags = [ "--package clnrest" ];
nativeCheckInputs = [
# Required by lightning/cln-grpc/build.rs
protobuf
];
meta = with lib; {
description = "REST plugin for clightning";
homepage = "https://github.com/ElementsProject/lightning/tree/master/plugins/rest-plugin";
license = licenses.mit;
maintainers = with maintainers; [
erikarvstedt
];
mainProgram = "clnrest";
};
}

View file

@ -12,6 +12,7 @@ in
let self = {
clightning-rest = pkgs.callPackage ./clightning-rest { inherit (self) fetchNodeModules; };
clightning-plugins = pkgs.recurseIntoAttrs (import ./clightning-plugins pkgs self.nbPython3Packages);
clnrest = pkgs.callPackage ./clnrest { inherit (self.pinned) clightning; };
joinmarket = pkgs.callPackage ./joinmarket { inherit (self) nbPython3PackagesJoinmarket; };
lndinit = pkgs.callPackage ./lndinit { };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };