mirror of
https://github.com/logos-co/logos-messaging-module.git
synced 2026-08-27 10:41:19 +00:00
Re-forked from tag 1.0.0 (256eca02), which is the commit that ships inside logos-basecamp AppImage v0.1.1. Starting from 1.0.0 (instead of6eeda84) means the tutorial-v1-compat LGX unambiguously reproduces the delivery_module shipped by basecamp -- lifecycle RPCs (createNode, start, stop, subscribe, unsubscribe) return plain bool on the wire, send() returns LogosResult, and the implementation matches what basecamp actually calls into. Tag 1.0.0 predates the logos-module-builder migration, so this commit overlays the minimum set of module-builder packaging artifacts required to build the module as an LGX: * CMakeLists.txt -- replaced with the mkLogosModule-style build that delegates to LogosModule.cmake. Sources were moved to src/ to match the convention. * metadata.json -- extended with the nix.external_libraries block required by module-builder. * flake.nix / flake.lock -- introduced (1.0.0 used a bespoke ./nix/ builder with vendored submodules, which no longer matches the downstream module-builder toolchain). * test/test_create_node_integration.cpp -- brought over from the newer tree. It compiles against the 1.0.0 plugin API, though the createNode_secondCallRejected_afterSuccessfulInit case asserts behaviour that only exists post-1.0.0; tests are gated on BUILD_TESTING and are not exercised by the portable LGX build. On top of that the externalLibInputs fix that was previously the tip of this branch is re-applied: * flake.nix: externalLibInputs = { logosdelivery = { input = ...; packages.default = "liblogosdelivery"; }; } (new shape). * metadata.json: nix.external_libraries[].name = "logosdelivery" to match. * logos-delivery pinned to 509c8755 so liblogosdelivery.so lands in $out/lib/ instead of $out/bin/, which module-builder's copy logic requires. src/ is the verbatim 1.0.0 source. Wire-level RPC signatures were verified byte-identical to6eeda84prior to this rebase (same Q_INVOKABLE set, same types; only internal createNode reentrancy changes differ). Refs: logos-co/logos-delivery-module#22 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 lines
1.0 KiB
Nix
32 lines
1.0 KiB
Nix
{
|
|
description = "Logos Delivery Module";
|
|
|
|
inputs = {
|
|
logos-module-builder.url = "github:logos-co/logos-module-builder";
|
|
nix-bundle-lgx.url = "github:logos-co/nix-bundle-lgx";
|
|
logos-delivery.url = "git+https://github.com/logos-messaging/logos-delivery?submodules=1";
|
|
};
|
|
|
|
outputs = inputs@{ logos-module-builder, ... }:
|
|
logos-module-builder.lib.mkLogosModule {
|
|
src = ./.;
|
|
configFile = ./metadata.json;
|
|
flakeInputs = inputs;
|
|
externalLibInputs = {
|
|
logosdelivery = {
|
|
input = inputs.logos-delivery;
|
|
packages.default = "liblogosdelivery";
|
|
};
|
|
};
|
|
postInstall = ''
|
|
# Use pkg-config to locate the exact libpq from the build environment
|
|
LIBPQ_LIBDIR=$(pkg-config --variable=libdir libpq 2>/dev/null || true)
|
|
if [ -n "$LIBPQ_LIBDIR" ] && [ -d "$LIBPQ_LIBDIR" ]; then
|
|
for f in "$LIBPQ_LIBDIR"/libpq.*; do
|
|
[ -f "$f" ] && cp -L "$f" $out/lib/ 2>/dev/null || true
|
|
done
|
|
fi
|
|
'';
|
|
};
|
|
}
|