Danish Arora 9b858ee4a7
fix(nix): fetch git submodules automatically via inputs.self
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.
2026-02-27 12:50:24 +08:00
..

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#"