nixpkgs/pkgs/by-name/lc/lcov/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.6 KiB
Nix
Raw Normal View History

2024-06-23 22:16:17 +00:00
{
lib,
stdenv,
fetchFromGitHub,
perl,
python3,
perlPackages,
makeWrapper,
}:
2024-06-23 22:16:17 +00:00
let
perlDeps = [
perlPackages.CaptureTiny
perlPackages.DateTime
perlPackages.DateTimeFormatW3CDTF
perlPackages.DevelCover
perlPackages.GD
perlPackages.JSONXS
perlPackages.PathTools
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ perlPackages.MemoryProcess ];
2024-06-23 22:16:17 +00:00
in
stdenv.mkDerivation rec {
2020-08-27 20:00:49 +00:00
pname = "lcov";
2024-11-09 14:58:17 +00:00
version = "2.2";
2020-08-27 20:00:49 +00:00
src = fetchFromGitHub {
owner = "linux-test-project";
repo = "lcov";
rev = "v${version}";
2024-11-09 14:58:17 +00:00
hash = "sha256-cZdDlOf3IgPQrUNl+wu6Gwecaj+r2xu0eqmlz67TeAI=";
};
nativeBuildInputs = [ makeWrapper ];
2024-06-23 22:16:17 +00:00
buildInputs = [
perl
python3
];
preBuild = ''
2016-05-05 08:38:33 +00:00
patchShebangs bin/
makeFlagsArray=(PREFIX=$out LCOV_PERL_PATH=$(command -v perl))
'';
postInstall = ''
2024-06-23 22:16:17 +00:00
for f in "$out"/bin/{gen*,lcov,perl2lcov}; do
wrapProgram "$f" --set PERL5LIB ${perlPackages.makeFullPerlPath perlDeps}
done
'';
2024-06-23 22:16:17 +00:00
meta = {
description = "Code coverage tool that enhances GNU gcov";
2024-06-23 22:16:17 +00: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.
'';
2024-06-23 22:16:17 +00:00
homepage = "https://github.com/linux-test-project/lcov";
license = lib.licenses.gpl2Plus;
2024-06-23 22:16:17 +00:00
maintainers = with lib.maintainers; [ dezgeg ];
platforms = lib.platforms.all;
};
}