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

    
                      
 
                  
                             
                                 
     
 

                                                                    
                           
                                                    
                                                                                               



                                         
{ stdenv, buildGoModule, fetchFromGitHub }:

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

  subPackages = [ "." ];
  outputs = [ "out" "data" ];

  src = fetchFromGitHub {
    owner  = "errata-ai";
    repo   = "vale";
    rev    = "v${version}";
    sha256 = "0jxlh8dlhhqw1mrhp42nywnp6wwpk7nw373s89lp3khhqwb1n08f";
  };

  vendorSha256 = null;

  postInstall = ''
    mkdir -p $data/share/vale
    cp -r styles $data/share/vale
  '';

  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];

  meta = with stdenv.lib; {
    homepage = "https://errata-ai.gitbook.io/vale/";
    description = "A syntax-aware linter for prose built with speed and extensibility in mind";
    license = licenses.mit;
    maintainers = [ maintainers.marsam ];
  };
}