1 { lib, buildGoModule, fetchFromGitLab, python3 }:
6 src = fetchFromGitLab {
10 hash = "sha256-uHX45KZO6R0tgTU10csKLiVYZZ/ea2V6BwhF6vfKKtA=";
15 excludedPackages = "tests";
17 nativeBuildInputs = [ python3 ];
19 ldflags = [ "-s" "-w" ];
22 patchShebangs --build tablegen.py
28 description = "Re-implementation of sloccount in Go";
29 mainProgram = "loccount";
31 loccount is a re-implementation of David A. Wheeler's sloccount tool
32 in Go. It is faster and handles more different languages. Because
33 it's one source file in Go, it is easier to maintain and extend than the
34 multi-file, multi-language implementation of the original.
36 The algorithms are largely unchanged and can be expected to produce
37 identical numbers for languages supported by both tools. Python is
38 an exception; loccount corrects buggy counting of single-quote multiline
39 literals in sloccount 2.26.
41 homepage = "https://gitlab.com/esr/loccount";
42 downloadPage = "https://gitlab.com/esr/loccount/tree/master";
43 license = licenses.bsd2;
44 maintainers = with maintainers; [ calvertvl ];