2021-01-23 12:26:19 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
|
2004-10-22 15:34:58 +01:00
|
|
|
|
2009-08-28 15:11:09 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2020-08-27 21:00:49 +01:00
|
|
|
pname = "lcov";
|
|
|
|
version = "1.15";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-test-project";
|
|
|
|
repo = "lcov";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1kvc7fkp45w48f0bxwbxvxkicnjrrydki0hllg294n1wrp80zzyk";
|
2004-10-22 15:34:58 +01:00
|
|
|
};
|
2008-03-20 18:51:07 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
2009-08-31 16:02:01 +01:00
|
|
|
|
2008-03-20 18:51:07 +00:00
|
|
|
preBuild = ''
|
2016-05-05 09:38:33 +01:00
|
|
|
patchShebangs bin/
|
2019-03-15 07:27:54 +00:00
|
|
|
makeFlagsArray=(PREFIX=$out LCOV_PERL_PATH=$(command -v perl))
|
2008-03-20 18:51:07 +00:00
|
|
|
'';
|
|
|
|
|
2020-02-28 11:31:02 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]}
|
2020-08-27 21:00:49 +01:00
|
|
|
wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]}
|
2020-02-28 11:31:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Code coverage tool that enhances GNU gcov";
|
2010-04-18 22:51:33 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ltp.sourceforge.net/coverage/lcov.php";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2010-04-18 22:51:33 +01:00
|
|
|
|
2018-01-17 05:13:23 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg ];
|
2014-01-28 17:11:00 +00:00
|
|
|
platforms = platforms.all;
|
2008-03-20 18:51:07 +00:00
|
|
|
};
|
2004-10-22 15:34:58 +01:00
|
|
|
}
|