mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-20 15:41:16 +00:00
tree-sitter-grammars: enable __structuredAttrs (#538991)
This commit is contained in:
@@ -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"
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user