tree-sitter: explicitly incl CXX headers on Darwin

clang needs to find headers + libraries for compiling with libc++.
On Darwin we will include CXX headers when compiling C.

This closes #124396
master
Carlos Hernandez 2021-05-31 09:20:22 -06:00
parent 6d2a162393
commit 99b351b4bd
1 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,7 @@
{ stdenv
, tree-sitter
, libcxx
, lib
}:
# Build a parser grammar and put the resulting shared object in `$out/parser`
@ -27,6 +29,7 @@ stdenv.mkDerivation {
"${source}/${location}"
;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
buildInputs = [ tree-sitter ];
dontUnpack = true;