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


                        
                                                                   

    
                                                                       
 
                  
                             
                                 
     
 
                                                       
 
                    
                                                   
                                                                                               



                                         
{ lib, buildGoModule, fetchFromGitHub }:

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

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

  src = fetchFromGitHub {
    owner = "errata-ai";
    repo = "vale";
    rev = "v${version}";
    sha256 = "sha256-4KP4/mfuHTYxOwWqHOa2RNHgElOg6YNAEFmiuF/sHa8=";
  };

  vendorSha256 = "sha256-2vYe943HHybOLcP8nDJe7RimMRIJdND2UPwtwB2mttE=";

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