add nix infrastructure to build the grammar

This commit is contained in:
2023-07-04 07:20:42 +00:00
parent edd60ed689
commit ec29df4a13
6 changed files with 118 additions and 0 deletions

20
flake.nix Normal file
View File

@@ -0,0 +1,20 @@
{
description = "tree-sitter implementation for nix-shell scripts";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs {
inherit system;
};
in rec {
packages.tree-sitter-nixshell = pkgs.callPackage ./default.nix { };
defaultPackage = packages.tree-sitter-nixshell;
devShells.default = pkgs.callPackage ./shell.nix { };
});
}