2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cloc";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.96";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AlDanial";
|
|
|
|
repo = "cloc";
|
2021-05-20 23:08:51 +00:00
|
|
|
rev = "v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
sha256 = "sha256-20vL+SX8Tbp6QxErDn76c6sLWnB1IJwHlQX4YAvj+Eg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */Unix)
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-12-19 01:06:50 +00:00
|
|
|
buildInputs = with perlPackages; [
|
|
|
|
perl
|
|
|
|
AlgorithmDiff
|
|
|
|
ParallelForkManager
|
|
|
|
RegexpCommon
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ];
|
|
|
|
|
|
|
|
postFixup = "wrapProgram $out/bin/cloc --prefix PERL5LIB : $PERL5LIB";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A program that counts lines of source code";
|
|
|
|
homepage = "https://github.com/AlDanial/cloc";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [ rycee ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|