loccount: 1.2 -> 2.14

This commit is contained in:
Aaron Jheng 2022-12-16 14:23:06 +00:00
parent fbcb61bd7e
commit f914350e81
No known key found for this signature in database
GPG key ID: F6A547A869D050A3

View file

@ -1,18 +1,29 @@
{ lib, buildGoPackage, fetchFromGitLab }:
buildGoPackage rec {
{ lib, buildGoModule, fetchFromGitLab, python3 }:
buildGoModule rec {
pname = "loccount";
version = "1.2";
goPackagePath = "gitlab.com/esr/loccount";
excludedPackages = "tests";
version = "2.14";
src = fetchFromGitLab {
owner = "esr";
repo = "loccount";
rev = version;
sha256 = "18z7ai7wy2k9yd3w65d37apfqs3h9bc2c15y7v1bydppi44zfsdk";
hash = "sha256-9tzDNwWM4uzxC+xqM603l8EIqYrGUUvZgSe6r1EyHi8=";
};
vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
excludedPackages = "tests";
nativeBuildInputs = [ python3 ];
ldflags = [ "-s" "-w" ];
preBuild = ''
patchShebangs --build tablegen.py
go generate
'';
meta = with lib; {
description = "Re-implementation of sloccount in Go";
longDescription = ''
@ -26,10 +37,9 @@ buildGoPackage rec {
an exception; loccount corrects buggy counting of single-quote multiline
literals in sloccount 2.26.
'';
homepage="https://gitlab.com/esr/loccount";
downloadPage="https://gitlab.com/esr/loccount/tree/master";
homepage = "https://gitlab.com/esr/loccount";
downloadPage = "https://gitlab.com/esr/loccount/tree/master";
license = licenses.bsd2;
maintainers = with maintainers; [ calvertvl ];
platforms = platforms.unix;
};
}