From c7908050488af07b901ce984f1fc96154c3a7735 Mon Sep 17 00:00:00 2001 From: c4710n Date: Mon, 4 Dec 2023 08:54:05 +0800 Subject: [PATCH] tree-sitter-grammar: ensure enough space when updating id of shared lib on Darwin --- pkgs/development/tools/parsing/tree-sitter/grammar.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/grammar.nix b/pkgs/development/tools/parsing/tree-sitter/grammar.nix index ce46e3623baea..6deba19361cca 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammar.nix +++ b/pkgs/development/tools/parsing/tree-sitter/grammar.nix @@ -23,8 +23,13 @@ stdenv.mkDerivation ({ nativeBuildInputs = lib.optionals generate [ nodejs tree-sitter ]; - CFLAGS = [ "-Isrc" "-O2" ]; - CXXFLAGS = [ "-Isrc" "-O2" ]; + env = { + CFLAGS = toString [ "-Isrc" "-O2" ]; + CXXFLAGS = toString [ "-Isrc" "-O2" ]; + } // lib.optionalAttrs stdenv.isDarwin { + # Ensure that there is enough space to update the install names of the output on Darwin. + NIX_LDFLAGS = "-headerpad_max_install_names"; + }; stripDebugList = [ "parser" ];