nixpkgs/pkgs/tools/text/vale/default.nix
2021-10-16 01:56:04 -05:00

33 lines
803 B
Nix

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