summary refs log blame commit diff
path: root/pkgs/tools/text/vale/default.nix
blob: 9ecd7f44cfa8905998f56041c57e2c629036447c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                        
 
                   
                 
                     
 
                               
                             
 
                         


                        
                                                                   

    
                                                                       
 
                  
                             
                                 
     
 
                                                       
 
                    
                                                   
                                                                                               



                                         
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "vale";
  version = "2.15.3";

  subPackages = [ "cmd/vale" ];
  outputs = [ "out" "data" ];

  src = fetchFromGitHub {
    owner = "errata-ai";
    repo = "vale";
    rev = "v${version}";
    sha256 = "sha256-vhsn72xCe1wC4YRdo2m49iUj/3nVl0cyfeSmWRfESaY=";
  };

  vendorSha256 = "sha256-/0H35PGFFPch4jDnQ/ggctyHZJ5W/C1PNlkT5zzvI3M=";

  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 ];
  };
}