-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
113 lines (103 loc) · 2.93 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
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
{
description = "A minimalistic Vim and Neovim color scheme that uses very few colors.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
neovim = pkgs.vimUtils.buildVimPlugin {
pname = "yui";
version = "latest";
buildInputs = with pkgs; [
lua54Packages.lua
];
buildPhase = ''
make clean
make colors/yui.vim
make colors/yui_dark.vim
make autoload/lightline/colorscheme/yui.vim
make autoload/lightline/colorscheme/yui_dark.vim
rm -rf src flake.* screenshots README.md Makefile LICENSE* CONTRIBUTING.md
'';
src = with pkgs.lib;
cleanSourceWith {
filter = cleanSourceFilter;
src = ./.;
};
};
makeFishPlugin = pkgName: makePath:
pkgs.fishPlugins.buildFishPlugin rec {
pname = pkgName;
version = "git";
buildInputs = with pkgs; [
lua54Packages.lua
];
buildPhase = ''
make clean
make ${makePath}
mkdir -p conf.d
mv ${makePath} conf.d/
'';
src = with pkgs.lib;
cleanSourceWith {
filter = cleanSourceFilter;
src = ./.;
};
};
alacritty = pkgs.stdenv.mkDerivation {
buildInputs = with pkgs; [
lua54Packages.lua
];
pname = "yui";
version = "latest";
buildPhase = ''
make clean
make alacritty/yui_light.yml
make alacritty/yui_light.toml
make alacritty/yui_dark.yml
make alacritty/yui_dark.toml
'';
installPhase = ''
mkdir -p $out
cp -r alacritty $out
'';
src = with pkgs.lib;
cleanSourceWith {
filter = cleanSourceFilter;
src = ./.;
};
};
in rec {
packages = flake-utils.lib.flattenTree {
neovim = neovim;
alacritty = alacritty;
fish_dark = makeFishPlugin "fish_dark" "fish/yui_dark.fish";
fish_light = makeFishPlugin "fish_light" "fish/yui.fish";
};
defaultPackage = packages.nvim;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
coreutils
moreutils
jq
alejandra
nodePackages.prettier
(lua54Packages.lua.withPackages (ps:
with ps; [
]))
lua-language-server
stylua
];
};
}
);
}