about summary refs log blame commit diff
path: root/users/Profpatsch/emacs-tree-sitter-move/shell.nix
blob: f400d5c021615dcd5628abae355a7e768bf7e064 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                


                     
                                                             




                                                                                                                  

              




                                               
{ 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;
}