a291c8690a
GitOrigin-RevId: e6e19f3d81a982a62e1bba08f0b4f7fdc21b4ea0
17 lines
447 B
Nix
17 lines
447 B
Nix
{ pkgs ? import ../../../third_party { }, ... }:
|
|
let
|
|
inherit (pkgs) lib;
|
|
|
|
treeSitterGrammars = pkgs.runCommandLocal "grammars" { } ''
|
|
mkdir -p $out/bin
|
|
${lib.concatStringsSep "\n"
|
|
(lib.mapAttrsToList (name: src: "ln -s ${src}/parser $out/bin/${name}.so") pkgs.tree-sitter.builtGrammars)};
|
|
'';
|
|
|
|
in
|
|
pkgs.mkShell {
|
|
buildInputs = [
|
|
pkgs.tree-sitter.builtGrammars.python
|
|
];
|
|
TREE_SITTER_GRAMMAR_DIR = treeSitterGrammars;
|
|
}
|