forked from polarmutex/git-worktree.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
128 lines (123 loc) · 3.73 KB
/
flake.nix
File metadata and controls
128 lines (123 loc) · 3.73 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
description = "git-worktree.nvim - supercharge your haskell experience in neovim";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
neorocks. url = "github:nvim-neorocks/neorocks";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
neodev-nvim = {
url = "github:folke/neodev.nvim";
flake = false;
};
plenary-nvim = {
url = "github:nvim-lua/plenary.nvim";
flake = false;
};
telescope-nvim = {
url = "github:nvim-telescope/telescope.nvim";
flake = false;
};
};
outputs = inputs @ {
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
perSystem = {
config,
pkgs,
system,
inputs',
...
}: let
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = self;
hooks = {
alejandra.enable = true;
#stylua.enable = true;
#luacheck.enable = true;
#markdownlint.enable = true;
};
};
in {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.neorocks.overlays.default
];
};
devShells = {
default = pkgs.mkShell {
name = "haskell-tools.nvim-shell";
inherit (pre-commit-check) shellHook;
buildInputs =
(with pkgs; [
neorocks
])
++ (with inputs.pre-commit-hooks.packages.${system}; [
alejandra
#lua-language-server
#stylua
#luacheck
#markdownlint-cli
]);
};
};
packages.neodev-plugin = pkgs.vimUtils.buildVimPlugin {
name = "neodev.nvim";
src = inputs.neodev-nvim;
};
packages.plenary-plugin = pkgs.vimUtils.buildVimPlugin {
name = "plenary.nvim";
src = inputs.plenary-nvim;
};
packages.telescope-plugin = pkgs.vimUtils.buildVimPlugin {
name = "telescope.nvim";
src = inputs.telescope-nvim;
};
packages.neorocks-test-stable = pkgs.callPackage ./nix/neorocks-test.nix {
name = "git-worktree-stable";
inherit self;
nvim = pkgs.neovim-unwrapped;
inherit (config.packages) plenary-plugin;
};
checks = {
inherit pre-commit-check;
# type-check-stable = pkgs.callPackage ./nix/type-check.nix {
# stable = true;
# inherit (config.packages) neodev-plugin telescope-plugin;
# inherit (inputs) pre-commit-hooks;
# inherit self;
# };
# type-check-nightly = pkgs.callPackage ./nix/type-check.nix {
# stable = false;
# inherit (config.packages) neodev-plugin telescope-plugin;
# inherit (inputs) pre-commit-hooks;
# inherit self;
# };
neorocks-test-stable = pkgs.callPackage ./nix/neorocks-test.nix {
name = "git-worktree-stable";
inherit self;
nvim = pkgs.neovim-unwrapped;
inherit (config.packages) plenary-plugin;
};
neorocks-test-unstable = pkgs.callPackage ./nix/neorocks-test.nix {
name = "git-worktree-nightly";
inherit self;
nvim = pkgs.neovim-nightly;
inherit (config.packages) plenary-plugin;
};
};
};
};
}