1 diff --git a/src/terralib.lua b/src/terralib.lua
2 index 532ed18..2c265dc 100644
5 @@ -3426,6 +3426,16 @@ function terra.includecstring(code,cargs,target)
6 args:insert("-internal-isystem")
9 + -- NOTE(aseipp): include relevant Nix header files
10 + args:insert("-isystem")
11 + args:insert("@NIX_LIBC_INCLUDE@")
13 + local nix_cflags = os.getenv('NIX_CFLAGS_COMPILE')
14 + if nix_cflags ~= nil then
15 + for w in nix_cflags:gmatch("%S+") do
19 -- Obey the SDKROOT variable on macOS to match Clang behavior.
20 local sdkroot = os.getenv("SDKROOT")