In zig 0.12.0 there is a NativePaths.detect that uses NIX_ environment variables.
EDIT: the compiler calls it!
NIX_CFLAGS_COMPILEis a space separated-frameworkor-systemargumentsNIX_LDFLAGSis a space separated-l-L-rpatharguments.
Using addLibraryPath and addIncludePath you can use a library. See also: Linking `ncurses` on NixOS - #5 by RijanHasTwoEars7