Hi all!
I’ve stumbled into a particularly tricky issue when building a package in Nix. The package in question builds a Nim lang library with lots of dependencies. Along the way, Nim compiler invokes clang
and provides header search paths to it.
When doing nix-build
, the build fails with a message that a particular header cannot be found, and dumps the compiler invocation. It is clear that the header is there because the relevant header search path is included (it belongs to another Nix package). What is strange is that if i enter nix-shell
and run genericBuild
, it all works fine.
What could possibly cause this? Tried to compare environment variables between nix-build
and nix-shell
, everything is identical, except for unrelated stuff. I’m completely confused. Will be super-grateful for any pointers.