-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverlays.nix
154 lines (147 loc) · 4.21 KB
/
overlays.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
inputs: with inputs; [
nix-filter.overlays.default
nix-vscode-extensions.overlays.default
# neovim-nightly-overlay.overlays.default
(
final: prev:
let
inherit (builtins)
filter
elem
attrNames
listToAttrs
getAttr
;
inherit (prev.lib) optionalString cleanSource;
inherit (prev.stdenv) system isDarwin mkDerivation;
inherit (prev.vimUtils) buildVimPlugin;
excludeInputs = [
"self"
"nixpkgs"
"nixpkgs-stable"
"systems"
"flake-parts"
"nix-filter"
"bundler"
"junit-console"
"jol"
"skk-dict"
"ctags-lsp"
];
plugins = filter (name: !(elem name excludeInputs)) (attrNames inputs);
base = {
version = "overlay";
};
in
{
pkgs-stable = import nixpkgs-stable { inherit system; };
norg-fmt = prev.rustPlatform.buildRustPackage {
pname = "neorg-fmt";
version = inputs.norg-fmt.rev;
src = cleanSource inputs.norg-fmt;
cargoLock = {
lockFile = "${inputs.norg-fmt}/Cargo.lock";
allowBuiltinFetchGit = true;
};
};
javaPackages = prev.javaPackages // {
inherit (inputs) jol junit-console;
};
nodePackages = prev.nodePackages // {
};
vscode-extensions = prev.vscode-extensions // {
# vscjava = prev.vscode-extensions.vscjava // {
# vscode-java-test = pkgs.vscode-utils.buildVscodeMarketplaceExtension {
# mktplcRef = {
# name = "vscode-java-test";
# publisher = "vscjava";
# version = "0.42.2024080609";
# hash = "sha256-LuI4V/LAvwzU5OgPLdErkeXmyoxTiDNMJXTNNaX7mbc=";
# };
# meta = {
# license = pkgs.lib.licenses.mit;
# };
# };
# };
};
vimPlugins =
prev.vimPlugins
// (listToAttrs (
map (name: {
inherit name;
value = buildVimPlugin {
version = (getAttr name inputs).rev or "latest";
pname = name;
src = getAttr name inputs;
doCheck = false;
};
}) plugins
))
// {
telescope-fzf-native-nvim = buildVimPlugin (
base
// {
pname = "telescope-fzf-native-nvim";
src = inputs.telescope-fzf-native-nvim;
buildPhase = "make";
}
);
vim-sonictemplate = buildVimPlugin (
base
// {
pname = "vim-sonictemplate";
src = prev.nix-filter {
root = inputs.vim-sonictemplate;
exclude = [
"template/java"
"template/make"
];
};
}
);
LuaSnip = buildVimPlugin (
base
// {
pname = "LuaSnip";
src = inputs.LuaSnip;
nativeBuildInputs = [ prev.gcc ];
buildPhase = ''
${optionalString isDarwin "LUA_LDLIBS='-undefined dynamic_lookup -all_load'"}
JSREGEXP_PATH=deps/jsregexp
make "INCLUDE_DIR=-I $PWD/deps/lua51_include" LDLIBS="$LUA_LDLIBS" -C $JSREGEXP_PATH
cp $JSREGEXP_PATH/jsregexp.so lua/luasnip-jsregexp.so
'';
}
);
};
gin-vim = buildVimPlugin (
base
// {
pname = "gin-vim";
src = inputs.gin-vim;
dontPatchShebangs = true;
postInstall = ''
substituteInPlace \
$out/denops/gin/proxy/editor.ts \
$out/denops/gin/proxy/askpass.ts \
--replace "/usr/bin/env -S deno" "${prev.deno}/bin/deno"
'';
}
);
skk-dict = mkDerivation {
name = "skk-dict";
src = inputs.skk-dict;
installPhase = ''
mkdir $out
cp SKK-JISYO.L $out/SKK-JISYO.L
'';
};
ctags-lsp = prev.buildGoModule {
src = inputs.ctags-lsp;
pname = "ctags-lsp";
version = inputs.ctags-lsp.rev;
vendorHash = null;
};
}
)
]