Commit 590411b8 authored by Yifei Sun's avatar Yifei Sun Committed by Valentin Gagarin
Browse files

python3Packages.tree-sitter-grammars: fix dynamic linker cannot find `parser` on darwin

closes #402677

need to make `DYLD_LIBRARY_PATH` available
parent aba39ed8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  pytestCheckHook,
  tree-sitter,
@@ -132,6 +133,10 @@ buildPythonPackage {
    ];
  };

  preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
    export DYLD_LIBRARY_PATH="${grammarDrv}"
  '';

  preCheck = ''
    # https://github.com/NixOS/nixpkgs/issues/255262
    rm -r ${snakeCaseName}