Add nix package

This commit is contained in:
Bruno BELANYI 2022-06-03 11:59:30 +02:00
parent 558e45aeed
commit 6cec0e4a68
1 changed files with 13 additions and 0 deletions

View File

@ -40,6 +40,8 @@
pkgs = import nixpkgs {
inherit system;
};
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
in
rec {
checks = {
@ -88,5 +90,16 @@
inherit (checks.pre-commit) shellHook;
};
};
packages = {
default =
let mkGrammar = pkgs.callPackage "${nixpkgs}/pkgs/development/tools/parsing/tree-sitter/grammar.nix" { };
in
mkGrammar {
language = "tiger";
inherit version;
source = ./.;
};
};
});
}