2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "vale";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "2.24.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
subPackages = [ "cmd/vale" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
outputs = [ "out" "data" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-10-17 02:12:59 +00:00
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "vale";
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-gX37n1h/O7CqgXgWBndBHLtIeUWJaIJVJLyIb3Sd9YY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
vendorHash = "sha256-ZgBt4BgZWViNqYCuqb/Wt1zVjFM9h1UsmsYox7kMJ1A=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $data/share/vale
|
2022-07-14 12:49:19 +00:00
|
|
|
cp -r testdata/styles $data/share/vale
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# Tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://vale.sh/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A syntax-aware linter for prose built with speed and extensibility in mind";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|