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";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.88";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AlDanial";
|
|
|
|
repo = "cloc";
|
|
|
|
rev = version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1ixgswzbzv63bl50gb2kgaqr0jcicjz6w610hi9fal1i7744zraw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */Unix)
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|