Repository navigation
Fix missing dependencies in flake for make - #8950
Conversation
Running `nix develop`, `./configure` and then `make` fails with this error: ``` tests/fuzz/fuzz-hmac-sha256.c:8:10: fatal error: openssl/evp.h: No such file or directory ``` After adding `openssl`, without `protobuf`, `make` fails while building `cln-grpc v0.5.0` because the `protoc` binary is missing.
also include uv in nix develop shell to run tests
2c9d669 to
cc462d3
Compare
|
I think the CI errors are unrelated:
|
cln-grpc stopped looking for protoc on PATH in 608f695 ("cln-grpc: vendor protoc as a build-dependency"): its build script now uses the statically linked protoc from protoc-bin-vendored, which also runs on NixOS. Nothing else in the build calls protoc; the Python bindings use grpc_tools.protoc. Changelog-None
Only the fuzz targets include OpenSSL headers, and make compiles them only when `openssl version` reports 3 or later. A package in buildInputs also puts its binary on PATH, so with openssl in the package, `nix build` would compile the fuzz targets as well. Keep it in the dev shells, where they're wanted. The package derivation is then the same as on master. Changelog-None
The libstdc++ that wheels such as grpcio need is a Linux problem. On darwin, stdenv.cc.cc is clang, so the hook put clang's lib directory on the library path for no reason. The shellHook already refers to stdenv.cc.cc.lib, which pulls it into the shell, so it doesn't need to be in buildInputs as well. Changelog-None
On NixOS, uv can't run the Python it downloads, because that binary
expects an FHS dynamic loader:
error: Python interpreter not found at `~/.local/share/uv/python/cpython-3.13.7-.../bin/python3.13`
Point uv at nixpkgs' Python and stop it from downloading one. This
also keeps the Python, glibc and the libstdc++ on LD_LIBRARY_PATH from
the same nixpkgs.
Changelog-None
|
Hi @ekzyis, thanks for this, and sorry it sat without a review for so long. To get it in, I've pushed four small commits on top of yours. Your two commits are unchanged. Shout if you disagree with any of it.
Against master, the PR now only changes Tested with the branch merged into master (dba2823):
On a Mac with Homebrew, the dev shell still needs #9456: without it, |
Andezion
left a comment
There was a problem hiding this comment.
maybe we could use one shared let block for the openssl, uv and shellHook settings, and reuse it in default and postgres, instead of repeating buildInputs per shell?
cdecker
left a comment
There was a problem hiding this comment.
Very nice, can't wait to see more nixified things, as it simplifies things considerably. Seeing that we may in future rely on all tooling being present and working as expected, would allow us for example to stop committing derived files, which are often a headache due to the potential for conflicts and stale files, not to speak of the depressing feeling of opening a 100+ files changed PR :-)
Important
26.04 FREEZE March 11th: Non-bugfix PRs not ready by this date will wait for 26.06.
RC1 is scheduled on March 23rd
The final release is scheduled for April 15th.
I followed the developer guide. On 13608c5, I get the following error after running
nix develop,./configureand thenmake:After adding
openssl, withoutprotobuf,makefails while buildingcln-grpc v0.5.0because theprotocbinary is missing:This PR fixes this by adding the missing dependencies to the flake.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgradeChangelog-None