python3Packages.xgrammar: move env vars into env for structuredAttrs

This commit is contained in:
Stefan Frijters
2026-02-28 14:03:22 +01:00
parent eb51358653
commit ce2a8de138
@@ -70,10 +70,12 @@ buildPythonPackage rec {
writableTmpDirAsHomeHook
];
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isLinux (toString [
# xgrammar hardcodes -flto=auto while using static linking, which can cause linker errors without this additional flag.
"-ffat-lto-objects"
]);
env = lib.optionalAttrs stdenv.hostPlatform.isLinux {
NIX_CFLAGS_COMPILE = toString [
# xgrammar hardcodes -flto=auto while using static linking, which can cause linker errors without this additional flag.
"-ffat-lto-objects"
];
};
disabledTests = [
# You are trying to access a gated repo.