depot/third_party/tvl/users/Profpatsch/emacs-tree-sitter-move/shell.nix

18 lines
447 B
Nix
Raw Normal View History

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