summary refs log blame commit diff
path: root/pkgs/development/tools/gosec/default.nix
blob: 9264ac27fa2aea20e33a1a872796fc6fa36b917b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                        
 
                   
                  
                    
 
                                


                         

                        
                                                                   

    
                                                                       
 

                  

                                                                                                                        
                    
                                                   


                                                            


                                                    
 
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "gosec";
  version = "2.8.1";

  subPackages = [ "cmd/gosec" ];

  src = fetchFromGitHub {
    owner = "securego";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-AlADSEekcUH/pCGggKlkBDiIYMe1zsoe9hh6fVUwQVA=";
  };

  vendorSha256 = "sha256-HBwIZfvkL9HSwkD1sZzBM7IJFAjLbCxyc95vqR5TFAg=";

  doCheck = false;

  buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version} -X main.GitTag=${src.rev} -X main.BuildDate=unknown" ];

  meta = with lib; {
    homepage = "https://github.com/securego/gosec";
    description = "Golang security checker";
    license = licenses.asl20;
    maintainers = with maintainers; [ kalbasit nilp0inter ];
    platforms = platforms.linux ++ platforms.darwin;
  };
}