2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub, fetchzip, nix-update-script }:
|
|
|
|
|
|
|
|
let
|
|
|
|
buildStyle =
|
|
|
|
{ name
|
|
|
|
, stylePath ? name
|
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
stdenvNoCC.mkDerivation ({
|
|
|
|
pname = "vale-style-${lib.toLower name}";
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
dontFixup = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/vale/styles
|
|
|
|
cp -R ${stylePath} "$out/share/vale/styles/${name}"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [ katexochen ];
|
|
|
|
} // (args.meta or { });
|
|
|
|
} // removeAttrs args [ "meta" "name" ]);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
alex = buildStyle rec {
|
|
|
|
name = "alex";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.2.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "alex";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-mfeMa+KlkqwyS+h+oo5p5+P2bsmZ0BOph2nbQiaoNqM=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of the guidelines enforced by the alex linter";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/alex";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
google = buildStyle rec {
|
|
|
|
name = "Google";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.6.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "Google";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-jSmfUgzlIbDVh2zLtnTNpM/z6dHMp358F9adLZ5+qcw=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of the Google Developer Documentation Style Guide";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/Google";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
joblint = buildStyle rec {
|
|
|
|
name = "Joblint";
|
|
|
|
version = "0.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "Joblint";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-zRz5ThOg5RLTZj3dYPe0PDvOF5DjO31lduSpi2Us87U=";
|
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of the Joblint linter";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/Joblint";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
microsoft = buildStyle rec {
|
|
|
|
name = "Microsoft";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.14.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "Microsoft";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-4j05bIGAVEy6untUqtrUxdLKlhyOcJsbcsow8OxRp1A=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of the Microsoft Writing Style Guide";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/Microsoft";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
proselint = buildStyle rec {
|
|
|
|
name = "proselint";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.3.4";
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "proselint";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-ryKJDX1JrvDWVKLC5qQGctweDf74yuwEXxl/IqumM4s=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of Python's proselint linter";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/proselint";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
readability = buildStyle rec {
|
|
|
|
name = "Readability";
|
|
|
|
version = "0.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "readability";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-5Y9v8QsZjC2w3/pGIcL5nBdhpogyJznO5IFa0s8VOOI=";
|
|
|
|
};
|
|
|
|
meta = {
|
|
|
|
description = "Vale-compatible implementations of many popular \"readability\" metrics";
|
|
|
|
homepage = "https://github.com/errata-ai/readability";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
write-good = buildStyle rec {
|
|
|
|
name = "write-good";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.4.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "write-good";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-W/eHlXklAVlAnY8nLPi/SIKsg8UUnH8UkH99BDo5yKk=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Vale-compatible implementation of the write-good linter";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/errata-ai/write-good";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|