nixpkgs-suyu/pkgs/tools/text/vale/default.nix
2024-03-23 03:05:56 +00:00

37 lines
945 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "vale";
version = "3.3.1";
subPackages = [ "cmd/vale" ];
outputs = [ "out" "data" ];
src = fetchFromGitHub {
owner = "errata-ai";
repo = "vale";
rev = "v${version}";
hash = "sha256-6hj8fm2eCGQeWY3+eaJlKeZglJUSMY4/Yz2ySGp6m58=";
};
vendorHash = "sha256-HMzFLSmO6sBDNU89UoIvHcPPd3ubpti2ii4sFMKUDmI=";
postInstall = ''
mkdir -p $data/share/vale
cp -r testdata/styles $data/share/vale
'';
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
# Tests require network access
doCheck = false;
meta = with lib; {
description = "A syntax-aware linter for prose built with speed and extensibility in mind";
homepage = "https://vale.sh/";
changelog = "https://github.com/errata-ai/vale/releases/tag/v${version}";
mainProgram = "vale";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}