fix: build the static library with the nimble dep paths

The static branch of buildLibrary passes --skipParentCfg:on, which drops the
config.nims that pulls in nimble.paths, so every nimble-resolved import fails
to resolve (`cannot open file: chronicles`). It went unnoticed because deps
used to be vendored submodules and only the dynamic build is exercised in CI;
the Rust bindings consume the static library.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ivan FB 2026-07-15 18:02:40 +02:00
parent 77cb8a6c7a
commit a49a892ae2
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -112,7 +112,7 @@ proc buildLibrary(lib_name: string, srcDir = "./", params = "", `type` = "static
if `type` == "static":
exec "nim c" & " --out:build/" & lib_name &
" --threads:on --app:staticlib --opt:speed --noMain --mm:refc --header -d:metrics --nimMainPrefix:" & mainPrefix & " --skipParentCfg:on -d:discv5_protocol_id=d5waku " &
" --threads:on --app:staticlib --opt:speed --noMain --mm:refc --header -d:metrics --nimMainPrefix:" & mainPrefix & " --skipParentCfg:off -d:discv5_protocol_id=d5waku " &
getMyCPU() & getNimParams() & srcDir & "/" & srcFile
else:
exec "nim c" & " --out:build/" & lib_name &