 + {
 +         my ($base_dir, $source) = @_;
 +         my $dir = $base_dir;
++ 
++         # Hack to make absolute paths work on Nixpkgs coverage
++         # reports.  The source is in /nix/store/<bla>/.build/<bla>.
++         $source = $1 if $source =~ /^\/.*\/\.build\/(.*)$/;
++         
 +         while (!-e "$dir/$source") {
 +                 $dir = $dir . "/..";
 +                 if (length $dir > 1000) {

  							$base_dir, $filename);
  					if (!defined($result{$filename}))
  					{
--- 1550,1556 ----
  				}
  				if ($blocks > 1)
  				{

diff --exclude '*~' -rc lcov-1.7-orig/bin/geninfo lcov-1.7/bin/geninfo
*** lcov-1.7-orig/bin/geninfo	2008-11-17 14:50:26.000000000 +0100
--- lcov-1.7/bin/geninfo	2009-09-02 10:55:25.000000000 +0200
***************
*** 51,56 ****
--- 51,57 ----
