mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-06 14:10:02 +00:00
The nix flake's `liblogosdelivery` derivation was pinning libp2p to the old master SHA ff8d51857, which still exports `valueOr` for `Option[T]` in `libp2p/utility`. Combined with this PR's `waku/common/option_shims.nim` (which also defines `valueOr` for `Option[T]` to cover libp2p 1.15.3+ where it was removed), the nix x86_64-linux build fails with: identify.nim(180, 25) Error: ambiguous call; both option_shims.valueOr and utility.valueOr match for: (Option[crypto.PublicKey], ) Regenerate `nix/deps.nix` via `tools/gen-nix-deps.sh nimble.lock nix/deps.nix` so the nix build picks up the same libp2p v2.0.0 (c43199378) + transitive deps that the nimble.lock-driven build uses. With libp2p v2.0.0, only option_shims defines `valueOr` for `Option[T]` -- no ambiguity.
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#"