-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlcov-1.16.nix
45 lines (36 loc) · 1.4 KB
/
lcov-1.16.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
stdenv.mkDerivation rec {
pname = "lcov";
version = "1.16";
src = fetchFromGitHub {
owner = "linux-test-project";
repo = "lcov";
rev = "v${version}";
sha256 = "sha256-X1T5OqR6NgTNGedH1on3+XZ7369007By6tRJK8xtmbk=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
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 ]}
wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]}
'';
meta = with lib; {
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 = "https://ltp.sourceforge.net/coverage/lcov.php";
license = lib.licenses.gpl2Plus;
maintainers = with maintainers; [ dezgeg ];
platforms = platforms.all;
};
}