at 24.11-pre 46 lines 1.4 kB view raw
1{ lib, buildGoModule, fetchFromGitLab, python3 }: 2buildGoModule rec { 3 pname = "loccount"; 4 version = "2.15"; 5 6 src = fetchFromGitLab { 7 owner = "esr"; 8 repo = "loccount"; 9 rev = version; 10 hash = "sha256-IRDwxz/InF4okyfAzbK0PzZz+HMUwv5LgRthUUy3rus="; 11 }; 12 13 vendorHash = null; 14 15 excludedPackages = "tests"; 16 17 nativeBuildInputs = [ python3 ]; 18 19 ldflags = [ "-s" "-w" ]; 20 21 preBuild = '' 22 patchShebangs --build tablegen.py 23 24 go generate 25 ''; 26 27 meta = with lib; { 28 description = "Re-implementation of sloccount in Go"; 29 mainProgram = "loccount"; 30 longDescription = '' 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. 35 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. 40 ''; 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 ]; 45 }; 46}