How do I actually get X11 header in my path

I’m very new to nixos, and I still don’t get it, I’ve added in my configuration.nix all the bloody libx11 thingy and I cannot understand what I’m supposed to do to just simply get X11 headers in my path for compiling my project. Does anyone knows how to solve this issue ?

This is intentionally not supported. You do not install libraries globally, you use nix-shell. See I installed a library but my compiler is not finding it. Why?

2 Likes

Thanks for aswering but that doesn’t seem to solve my problem I went and typed nix-shell -p xorg.libX11 but it doesn’t solve my problem when I do make I still get an error saying that there is not suitable directory for X11 any ideas ?

It really depends on the project you are trying to build. Modern projects should use pkg-config for finding dependencies, in which case, you can just add pkg-config and the dependency to nix-shell and it should find it automatically. But there are many projects that make weird assumptions and require extra build flags or patching (example).

1 Like