lcov: 1.16 -> 2.1

This commit is contained in:
Weijia Wang
2024-06-24 00:17:35 +02:00
parent 6d551ad270
commit f756ee7667
@@ -1,18 +1,42 @@
{lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
{
lib,
stdenv,
fetchFromGitHub,
perl,
python3,
perlPackages,
makeWrapper,
}:
let
perlDeps = [
perlPackages.CaptureTiny
perlPackages.DateTime
perlPackages.DateTimeFormatW3CDTF
perlPackages.DevelCover
perlPackages.GD
perlPackages.JSONXS
perlPackages.MemoryProcess
perlPackages.PathTools
];
in
stdenv.mkDerivation rec {
pname = "lcov";
version = "1.16";
version = "2.1";
src = fetchFromGitHub {
owner = "linux-test-project";
repo = "lcov";
rev = "v${version}";
sha256 = "sha256-X1T5OqR6NgTNGedH1on3+XZ7369007By6tRJK8xtmbk=";
hash = "sha256-QfA+mzLfpi2fuhcPvCKO7YnPef1GMhCbgBWdXFTXPzE=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
buildInputs = [
perl
python3
];
preBuild = ''
patchShebangs bin/
@@ -20,26 +44,27 @@ stdenv.mkDerivation rec {
'';
postInstall = ''
wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]}
wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]}
for f in "$out"/bin/{gen*,lcov,perl2lcov}; do
wrapProgram "$f" --set PERL5LIB ${perlPackages.makeFullPerlPath perlDeps}
done
'';
meta = with lib; {
meta = {
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.
'';
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 = "https://ltp.sourceforge.net/coverage/lcov.php";
homepage = "https://github.com/linux-test-project/lcov";
license = lib.licenses.gpl2Plus;
maintainers = with maintainers; [ dezgeg ];
platforms = platforms.all;
maintainers = with lib.maintainers; [ dezgeg ];
platforms = lib.platforms.all;
};
}