-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathflake.nix
More file actions
137 lines (126 loc) · 3.56 KB
/
flake.nix
File metadata and controls
137 lines (126 loc) · 3.56 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
129
130
131
132
133
134
135
136
137
{
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_light.vim
make colors/yui_dark.vim
make colors/yui.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 = ./.;
};
};
ghostty = pkgs.stdenv.mkDerivation {
buildInputs = with pkgs; [
lua54Packages.lua
];
pname = "yui";
version = "latest";
buildPhase = ''
make clean
make ghostty/yui_light
make ghostty/yui_dark
'';
installPhase = ''
mkdir -p $out
cp -r ghostty $out
'';
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;
ghostty = ghostty;
fish_dark = makeFishPlugin "fish_dark" "fish/yui_dark.fish";
fish_light = makeFishPlugin "fish_light" "fish/yui.fish";
};
defaultPackage = packages.neovim;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
coreutils
moreutils
jq
alejandra
nodePackages.prettier
(lua54Packages.lua.withPackages (ps:
with ps; [
]))
lua-language-server
stylua
];
};
}
);
}