Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 nix-update-script,
6}:
7
8let
9 buildStyle =
10 {
11 name,
12 stylePath ? name,
13 ...
14 }@args:
15 stdenvNoCC.mkDerivation (
16 {
17 pname = "vale-style-${lib.toLower name}";
18
19 dontConfigure = true;
20 dontBuild = true;
21 doCheck = false;
22 dontFixup = true;
23
24 installPhase = ''
25 runHook preInstall
26 mkdir -p $out/share/vale/styles
27 cp -R ${stylePath} "$out/share/vale/styles/${name}"
28 runHook postInstall
29 '';
30
31 passthru.updateScript = nix-update-script { };
32
33 meta = {
34 platforms = lib.platforms.all;
35 maintainers = with lib.maintainers; [ katexochen ];
36 }
37 // (args.meta or { });
38 }
39 // removeAttrs args [
40 "meta"
41 "name"
42 ]
43 );
44in
45
46{
47 alex = buildStyle rec {
48 name = "alex";
49 version = "0.2.3";
50 src = fetchFromGitHub {
51 owner = "errata-ai";
52 repo = "alex";
53 rev = "v${version}";
54 hash = "sha256-p0CQg6ZLusSKr57SugwlnoDEoPNVY3UIM8rHHxOL2l0=";
55 };
56 meta = {
57 description = "Vale-compatible implementation of the guidelines enforced by the alex linter";
58 homepage = "https://github.com/errata-ai/alex";
59 license = lib.licenses.mit;
60 };
61 };
62
63 google = buildStyle rec {
64 name = "Google";
65 version = "0.6.3";
66 src = fetchFromGitHub {
67 owner = "errata-ai";
68 repo = "Google";
69 rev = "v${version}";
70 hash = "sha256-1aN7wCdShhMsBN83u7l+5Ffm2WKC8ltZyT3hPZCNWYo=";
71 };
72 meta = {
73 description = "Vale-compatible implementation of the Google Developer Documentation Style Guide";
74 homepage = "https://github.com/errata-ai/Google";
75 license = lib.licenses.mit;
76 };
77 };
78
79 joblint = buildStyle rec {
80 name = "Joblint";
81 version = "0.4.1";
82 src = fetchFromGitHub {
83 owner = "errata-ai";
84 repo = "Joblint";
85 rev = "v${version}";
86 hash = "sha256-zRz5ThOg5RLTZj3dYPe0PDvOF5DjO31lduSpi2Us87U=";
87 };
88 meta = {
89 description = "Vale-compatible implementation of the Joblint linter";
90 homepage = "https://github.com/errata-ai/Joblint";
91 license = lib.licenses.mit;
92 };
93 };
94
95 microsoft = buildStyle rec {
96 name = "Microsoft";
97 version = "0.14.2";
98 src = fetchFromGitHub {
99 owner = "errata-ai";
100 repo = "Microsoft";
101 rev = "v${version}";
102 hash = "sha256-Sie4bBeKPOFOJhgd+mLbiz4vG+xpKL0LnwnRQHzOw+Q=";
103 };
104 meta = {
105 description = "Vale-compatible implementation of the Microsoft Writing Style Guide";
106 homepage = "https://github.com/errata-ai/Microsoft";
107 license = lib.licenses.mit;
108 };
109 };
110
111 proselint = buildStyle rec {
112 name = "proselint";
113 version = "0.3.4";
114 src = fetchFromGitHub {
115 owner = "errata-ai";
116 repo = "proselint";
117 rev = "v${version}";
118 hash = "sha256-ryKJDX1JrvDWVKLC5qQGctweDf74yuwEXxl/IqumM4s=";
119 };
120 meta = {
121 description = "Vale-compatible implementation of Python's proselint linter";
122 homepage = "https://github.com/errata-ai/proselint";
123 license = lib.licenses.bsd3;
124 };
125 };
126
127 readability = buildStyle rec {
128 name = "Readability";
129 version = "0.1.1";
130 src = fetchFromGitHub {
131 owner = "errata-ai";
132 repo = "readability";
133 rev = "v${version}";
134 hash = "sha256-5Y9v8QsZjC2w3/pGIcL5nBdhpogyJznO5IFa0s8VOOI=";
135 };
136 meta = {
137 description = "Vale-compatible implementations of many popular \"readability\" metrics";
138 homepage = "https://github.com/errata-ai/readability";
139 license = lib.licenses.mit;
140 };
141 };
142
143 write-good = buildStyle rec {
144 name = "write-good";
145 version = "0.4.1";
146 src = fetchFromGitHub {
147 owner = "errata-ai";
148 repo = "write-good";
149 rev = "v${version}";
150 hash = "sha256-W/eHlXklAVlAnY8nLPi/SIKsg8UUnH8UkH99BDo5yKk=";
151 };
152 meta = {
153 description = "Vale-compatible implementation of the write-good linter";
154 homepage = "https://github.com/errata-ai/write-good";
155 license = lib.licenses.mit;
156 };
157 };
158}