Merge pull request #206410 from aaronjheng/loccount

authored by Artturi and committed by GitHub 54360cca a0051de8

+20 -10
+20 -10
pkgs/development/tools/misc/loccount/default.nix
··· 1 - { lib, buildGoPackage, fetchFromGitLab }: 2 - buildGoPackage rec { 1 + { lib, buildGoModule, fetchFromGitLab, python3 }: 2 + buildGoModule rec { 3 3 pname = "loccount"; 4 - version = "1.2"; 5 - 6 - goPackagePath = "gitlab.com/esr/loccount"; 7 - excludedPackages = "tests"; 4 + version = "2.14"; 8 5 9 6 src = fetchFromGitLab { 10 7 owner = "esr"; 11 8 repo = "loccount"; 12 9 rev = version; 13 - sha256 = "18z7ai7wy2k9yd3w65d37apfqs3h9bc2c15y7v1bydppi44zfsdk"; 10 + hash = "sha256-9tzDNwWM4uzxC+xqM603l8EIqYrGUUvZgSe6r1EyHi8="; 14 11 }; 15 12 13 + vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; 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 + 16 27 meta = with lib; { 17 28 description = "Re-implementation of sloccount in Go"; 18 29 longDescription = '' ··· 26 37 an exception; loccount corrects buggy counting of single-quote multiline 27 38 literals in sloccount 2.26. 28 39 ''; 29 - homepage="https://gitlab.com/esr/loccount"; 30 - downloadPage="https://gitlab.com/esr/loccount/tree/master"; 40 + homepage = "https://gitlab.com/esr/loccount"; 41 + downloadPage = "https://gitlab.com/esr/loccount/tree/master"; 31 42 license = licenses.bsd2; 32 43 maintainers = with maintainers; [ calvertvl ]; 33 - platforms = platforms.unix; 34 44 }; 35 45 }