about summary refs log tree commit diff
path: root/pkgs/development/tools/analysis/lcov/default.nix
blob: d611f92d051654189781565e491c54dc5ff236da (plain) (blame)
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
{stdenv, fetchurl, perl}:

stdenv.mkDerivation rec {
  name = "lcov-1.7";
  
  src = fetchurl {
    url = "mirror://sourceforge/ltp/${name}.tar.gz";
    sha256 = "1cx3haizs0rw6wjsn486qcn50f3qpybflkkb1780cg6s8jzcwdin";
  };

  patches = [ ./find-source.patch ];

  preBuild = ''
    makeFlagsArray=(PREFIX=$out BIN_DIR=$out/bin MAN_DIR=$out/share/man)
  '';

  preInstall = ''
    substituteInPlace bin/install.sh --replace /bin/bash $shell
  '';

  postInstall = ''
    for i in $out/bin/*; do
      substituteInPlace $i --replace /usr/bin/perl ${perl}/bin/perl
    done
  ''; # */

  meta = {
    description = "A code coverage tool for Linux";
    homepage = http://ltp.sourceforge.net/coverage/lcov.php;
  };
}