Problem
A module often needs runtime helper executables alongside its plugin — e.g. radio-basecamp spawns mediamtx (HLS origin), tor/torsocks (onion mode), and ffplay. There's currently no supported way to ship them inside the .lgx: files a module writes via its flake postInstall to $out are dropped by the portable bundler. nix-bundle-dir closures only the plugin .so + its DT_NEEDED lib deps, so anything extra (a sidecar binary in $out/bin) never reaches modules/<name>/.
Repro
# module flake.nix
mkLogosModule {
src = ./.; configFile = ./metadata.json; flakeInputs = inputs;
postInstall = ''
mkdir -p "$out/bin"
install -m555 ${pkgs.mediamtx}/bin/mediamtx "$out/bin/mediamtx"
'';
}
nix build .#install-portable → find result -name mediamtx → empty. The binary is stripped from the bundle.
Impact
Modules that spawn helper binaries can't be self-contained. Today the user must install the binaries system-wide (or set env overrides), otherwise the module fails at runtime with e.g. "MediaMTX isn't available on this system." — a poor install UX, especially for catalog/lgpm installs where no setup script runs. metadata.json's nix.packages.runtime declares such deps but doesn't bundle them.
Ask
A supported "extra runtime files" mechanism — e.g. a runtimeBins / extraFiles argument to mkLogosModule that the portable bundler relocates into modules/<name>/bin/:
- Static binaries (Go, e.g. MediaMTX) → just copy.
- Dynamic binaries (tor, ffmpeg) → relocate their lib closure +
patchelf --set-rpath '$ORIGIN/../lib', the same treatment the plugin .so already gets — so the .lgx stays portable on machines without Nix.
That would let modules ship a complete, self-contained package.
Context / workaround
Hit while building radio-basecamp (decentralized audio broadcast). Current workaround: the module resolves binaries from its own dir (env → <module-dir>/bin/<tool> → PATH) and the dev install script drops a static MediaMTX post-install — but catalog installs don't run that script, so it isn't a real fix. Hence this request.
Problem
A module often needs runtime helper executables alongside its plugin — e.g. radio-basecamp spawns
mediamtx(HLS origin),tor/torsocks(onion mode), andffplay. There's currently no supported way to ship them inside the.lgx: files a module writes via its flakepostInstallto$outare dropped by the portable bundler.nix-bundle-dirclosures only the plugin.so+ itsDT_NEEDEDlib deps, so anything extra (a sidecar binary in$out/bin) never reachesmodules/<name>/.Repro
nix build .#install-portable→find result -name mediamtx→ empty. The binary is stripped from the bundle.Impact
Modules that spawn helper binaries can't be self-contained. Today the user must install the binaries system-wide (or set env overrides), otherwise the module fails at runtime with e.g. "MediaMTX isn't available on this system." — a poor install UX, especially for catalog/lgpm installs where no setup script runs.
metadata.json'snix.packages.runtimedeclares such deps but doesn't bundle them.Ask
A supported "extra runtime files" mechanism — e.g. a
runtimeBins/extraFilesargument tomkLogosModulethat the portable bundler relocates intomodules/<name>/bin/:patchelf --set-rpath '$ORIGIN/../lib', the same treatment the plugin.soalready gets — so the.lgxstays portable on machines without Nix.That would let modules ship a complete, self-contained package.
Context / workaround
Hit while building radio-basecamp (decentralized audio broadcast). Current workaround: the module resolves binaries from its own dir (env →
<module-dir>/bin/<tool>→ PATH) and the dev install script drops a static MediaMTX post-install — but catalog installs don't run that script, so it isn't a real fix. Hence this request.