2021-01-20 05:20:00 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2018-03-10 23:28:02 +01:00
|
|
|
|
2020-02-26 02:23:38 +01:00
|
|
|
buildGoModule rec {
|
2019-08-20 14:54:18 +02:00
|
|
|
pname = "vale";
|
2022-07-31 07:08:32 +02:00
|
|
|
version = "2.20.1";
|
2018-03-10 23:28:02 +01:00
|
|
|
|
2021-01-20 05:20:00 +01:00
|
|
|
subPackages = [ "cmd/vale" ];
|
2020-08-08 03:35:33 +02:00
|
|
|
outputs = [ "out" "data" ];
|
2019-02-24 02:25:21 +01:00
|
|
|
|
2018-03-10 23:28:02 +01:00
|
|
|
src = fetchFromGitHub {
|
2021-10-16 08:56:04 +02:00
|
|
|
owner = "errata-ai";
|
|
|
|
repo = "vale";
|
|
|
|
rev = "v${version}";
|
2022-07-31 07:08:32 +02:00
|
|
|
sha256 = "sha256-7n2gAZgt2ri/n0O9Sc2QEbZrzEgnyDh38JVdc+YuT5s=";
|
2018-03-10 23:28:02 +01:00
|
|
|
};
|
|
|
|
|
2022-07-09 06:20:00 +02:00
|
|
|
vendorSha256 = "sha256-ODzQkNOXEvSOhG6MoJbyxIwduFAW5FQb5hlOn3+io3A=";
|
2020-02-26 02:23:38 +01:00
|
|
|
|
2020-02-26 02:33:33 +01:00
|
|
|
postInstall = ''
|
2020-02-26 03:33:10 +01:00
|
|
|
mkdir -p $data/share/vale
|
2022-07-09 06:20:00 +02:00
|
|
|
cp -r testdata/styles $data/share/vale
|
2020-02-26 02:33:33 +01:00
|
|
|
'';
|
2019-08-20 14:54:18 +02:00
|
|
|
|
2021-08-26 08:45:51 +02:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-02-19 00:00:00 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-04-30 06:20:00 +02:00
|
|
|
homepage = "https://vale.sh/";
|
2019-01-18 13:05:24 +01:00
|
|
|
description = "A syntax-aware linter for prose built with speed and extensibility in mind";
|
2018-03-10 23:28:02 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|