-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
54 lines (47 loc) · 1.27 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "A GitHub action that lints your Lua code using lua-language-server. Static type checking with EmmyLua!";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
...
}: let
supportedSystems = [
"x86_64-linux"
];
perSystem = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: import nixpkgs {inherit system;};
lua-typecheck-action-for = system: let
pkgs = pkgsFor system;
lua-typecheck-action-wrapped = pkgs.lua51Packages.buildLuaApplication {
pname = "lua-typecheck-action";
version = "scm-1";
src = self;
};
in
pkgs.writeShellApplication {
name = "lua-typecheck-action";
runtimeInputs = with pkgs; [
lua-language-server
lua-typecheck-action-wrapped
];
text = ''
lua-typecheck-action.lua "$@"
'';
checkPhase = "";
};
in {
packages = perSystem (system: let
lua-typecheck-action = lua-typecheck-action-for system;
in {
default = lua-typecheck-action;
inherit lua-typecheck-action;
});
};
}