···11+{ lib
22+, buildGoModule
33+, fetchFromGitHub
44+}:
55+66+buildGoModule rec {
77+ pname = "licenseclassifier";
88+ version = "2.0.0";
99+1010+ src = fetchFromGitHub {
1111+ owner = "google";
1212+ repo = "licenseclassifier";
1313+ rev = "v${version}";
1414+ hash = "sha256-j+8hX8W0VD0h09Qmu7POnHT8f8+SeG5Si1fI0CDIwuo=";
1515+ };
1616+1717+ # The new and improved "License Classifier v2" is hidden in a subdirectory.
1818+ sourceRoot = "source/v2";
1919+2020+ vendorHash = "sha256-u0VR8DCmbZS0MF26Y4HfqtLaGyX2n2INdAidVNbnXPE=";
2121+2222+ ldflags = [ "-s" "-w" ];
2323+2424+ meta = with lib; {
2525+ description = "A License Classifier";
2626+ longDescription = ''
2727+ The license classifier can analyze text to determine what type of license
2828+ it contains. It searches for license texts in a file and compares them to
2929+ an archive of known licenses. These files could be, e.g., LICENSE files
3030+ with a single or multiple licenses in it, or source code files with the
3131+ license text in a comment.
3232+ '';
3333+ homepage = "https://github.com/google/licenseclassifier";
3434+ license = licenses.asl20;
3535+ platforms = platforms.unix;
3636+ maintainers = with maintainers; [ tnias ];
3737+ };
3838+}