at 22.05-pre 45 lines 1.4 kB view raw
1 {lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 pname = "lcov"; 5 version = "1.15"; 6 7 src = fetchFromGitHub { 8 owner = "linux-test-project"; 9 repo = "lcov"; 10 rev = "v${version}"; 11 sha256 = "1kvc7fkp45w48f0bxwbxvxkicnjrrydki0hllg294n1wrp80zzyk"; 12 }; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 buildInputs = [ perl ]; 16 17 preBuild = '' 18 patchShebangs bin/ 19 makeFlagsArray=(PREFIX=$out LCOV_PERL_PATH=$(command -v perl)) 20 ''; 21 22 postInstall = '' 23 wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]} 24 wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]} 25 ''; 26 27 meta = with lib; { 28 description = "Code coverage tool that enhances GNU gcov"; 29 30 longDescription = 31 '' LCOV is an extension of GCOV, a GNU tool which provides information 32 about what parts of a program are actually executed (i.e., 33 "covered") while running a particular test case. The extension 34 consists of a set of PERL scripts which build on the textual GCOV 35 output to implement the following enhanced functionality such as 36 HTML output. 37 ''; 38 39 homepage = "http://ltp.sourceforge.net/coverage/lcov.php"; 40 license = lib.licenses.gpl2Plus; 41 42 maintainers = with maintainers; [ dezgeg ]; 43 platforms = platforms.all; 44 }; 45}