tree-sitter-grammars: enable __structuredAttrs (#538991)

This commit is contained in:
Stefan Frijters
2026-07-07 09:19:38 +00:00
committed by GitHub

View File

@@ -37,21 +37,28 @@ stdenv.mkDerivation (
tree-sitter
];
CFLAGS = [
"-Isrc"
# Match upstream `tree-sitter build --wasm`
(if isWasi then "-Os" else "-O2")
]
++ lib.optionals isWasi [
"-fvisibility=hidden"
];
CXXFLAGS = [
"-Isrc"
(if isWasi then "-Os" else "-O2")
]
++ lib.optionals isWasi [
"-fvisibility=hidden"
];
env = args.env or { } // {
CFLAGS = toString (
[
"-Isrc"
# Match upstream `tree-sitter build --wasm`
(if isWasi then "-Os" else "-O2")
]
++ lib.optionals isWasi [
"-fvisibility=hidden"
]
);
CXXFLAGS = toString (
[
"-Isrc"
(if isWasi then "-Os" else "-O2")
]
++ lib.optionals isWasi [
"-fvisibility=hidden"
]
);
inherit language;
};
stripDebugList = [ "parser" ];
@@ -170,5 +177,7 @@ stdenv.mkDerivation (
"generate"
"excludeBrokenTreeSitterJson"
"meta"
"language"
"env"
]
)