nixpkgs-suyu/pkgs/tools/text/vale/default.nix
2022-07-31 05:08:32 +00:00

32 lines
793 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "vale";
version = "2.20.1";
subPackages = [ "cmd/vale" ];
outputs = [ "out" "data" ];
src = fetchFromGitHub {
owner = "errata-ai";
repo = "vale";
rev = "v${version}";
sha256 = "sha256-7n2gAZgt2ri/n0O9Sc2QEbZrzEgnyDh38JVdc+YuT5s=";
};
vendorSha256 = "sha256-ODzQkNOXEvSOhG6MoJbyxIwduFAW5FQb5hlOn3+io3A=";
postInstall = ''
mkdir -p $data/share/vale
cp -r testdata/styles $data/share/vale
'';
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
meta = with lib; {
homepage = "https://vale.sh/";
description = "A syntax-aware linter for prose built with speed and extensibility in mind";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}