forked from pradyuman/typespec-ts-mode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
40 lines (34 loc) · 1.1 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
description = "Emacs major mode for TypeSpec (using tree-sitter)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
tree-sitter-typespec = {
type = "github";
owner = "happenslol";
repo = "tree-sitter-typespec";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, tree-sitter-typespec }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
packages = rec {
default = typespec-ts-mode-emacs29;
typespec-ts-grammar = pkgs.tree-sitter.buildGrammar {
language = "tree-sitter-typespec";
version = tree-sitter-typespec.rev;
src = tree-sitter-typespec;
};
typespec-ts-mode = emacsPkgs:
emacsPkgs.trivialBuild {
pname = "typespec-ts-mode";
version = "0.1";
src = ./.;
};
typespec-ts-mode-emacs29 =
typespec-ts-mode (pkgs.emacsPackagesFor pkgs.emacs29);
};
});
}