depot/third_party/nixpkgs/pkgs/tools/text/vale/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

35 lines
842 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "vale";
version = "2.26.0";
subPackages = [ "cmd/vale" ];
outputs = [ "out" "data" ];
src = fetchFromGitHub {
owner = "errata-ai";
repo = "vale";
rev = "v${version}";
hash = "sha256-giGiA1W7mKOsP3yj8FhbXr0hL2YV7dRmkyUCkqsngWM=";
};
vendorHash = "sha256-KB1mRWDYejc38tUv316MiGfmq2riNnpEMIUpjgfSasU=";
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; {
homepage = "https://vale.sh/";
description = "A syntax-aware linter for prose built with speed and extensibility in mind";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}