2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-05 17:05:55 +00:00
|
|
|
pname = "lcov";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.16";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-test-project";
|
|
|
|
repo = "lcov";
|
|
|
|
rev = "v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-X1T5OqR6NgTNGedH1on3+XZ7369007By6tRJK8xtmbk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs bin/
|
|
|
|
makeFlagsArray=(PREFIX=$out LCOV_PERL_PATH=$(command -v perl))
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]}
|
2021-01-05 17:05:55 +00:00
|
|
|
wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Code coverage tool that enhances GNU gcov";
|
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' LCOV is an extension of GCOV, a GNU tool which provides information
|
|
|
|
about what parts of a program are actually executed (i.e.,
|
|
|
|
"covered") while running a particular test case. The extension
|
|
|
|
consists of a set of PERL scripts which build on the textual GCOV
|
|
|
|
output to implement the following enhanced functionality such as
|
|
|
|
HTML output.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = "http://ltp.sourceforge.net/coverage/lcov.php";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
maintainers = with maintainers; [ dezgeg ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|