btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / licenseclassifier / package.nix
blob369adafa10b4f2e1848f9448f58ce909ce67c0e7
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 }:
6 buildGoModule rec {
7   pname = "licenseclassifier";
8   version = "2.0.0";
10   src = fetchFromGitHub {
11     owner = "google";
12     repo = "licenseclassifier";
13     rev = "v${version}";
14     hash = "sha256-j+8hX8W0VD0h09Qmu7POnHT8f8+SeG5Si1fI0CDIwuo=";
15   };
17   # The new and improved "License Classifier v2" is hidden in a subdirectory.
18   sourceRoot = "${src.name}/v2";
20   vendorHash = "sha256-u0VR8DCmbZS0MF26Y4HfqtLaGyX2n2INdAidVNbnXPE=";
22   ldflags = [ "-s" "-w" ];
24   meta = with lib; {
25     description = "License Classifier";
26     mainProgram = "identify_license";
27     longDescription = ''
28       The license classifier can analyze text to determine what type of license
29       it contains. It searches for license texts in a file and compares them to
30       an archive of known licenses. These files could be, e.g., LICENSE files
31       with a single or multiple licenses in it, or source code files with the
32       license text in a comment.
33     '';
34     homepage = "https://github.com/google/licenseclassifier";
35     license = licenses.asl20;
36     platforms = platforms.unix;
37     maintainers = with maintainers; [ tnias ];
38   };