mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-03-03 03:03:14 +00:00
The Nix build fails when consumers use `nix build github:logos-messaging/logos-delivery#liblogosdelivery` without appending `?submodules=1` — vendor/nimbus-build-system is missing, causing patchShebangs and substituteInPlace to fail. Two fixes: 1. Add `inputs.self.submodules = true` to flake.nix (Nix >= 2.27) so submodules are fetched automatically without requiring callers to pass `?submodules=1`. 2. Fix the assertion in nix/default.nix: `(src.submodules or true)` always evaluates to true, silently masking the missing-submodules error. Changed to `builtins.pathExists` check on the actual submodule directory so it fails with a helpful message when submodules are genuinely absent.
Usage
Shell
A development shell can be started using:
nix develop
Building
To build a Codex you can use:
nix build '.?submodules=1#default'
The ?submodules=1 part should eventually not be necessary.
For more details see:
https://github.com/NixOS/nix/issues/4423
It can be also done without even cloning the repo:
nix build 'git+https://github.com/waku-org/nwaku?submodules=1#'
Running
nix run 'git+https://github.com/waku-org/nwaku?submodules=1#''
Testing
nix flake check ".?submodules=1#"