From 0196bb720e5a0a4fa12634387ffb002141cf318d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 30 Nov 2010 14:10:52 +0000 Subject: [PATCH] Making the addCoverageInformation stdenv adapter better in the sense that it does not override NIX_CFLAGS_COMPILE anymore in the mkDerivation parameter attributes. This way, apacheHttpd can be built properly with coverage information. An indication of this problem came from the nixos tests.subversion failure. svn path=/nixpkgs/branches/stdenv-updates/; revision=24938 --- pkgs/stdenv/adapters.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 16597d70c1a..5e135524af9 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -242,17 +242,18 @@ rec { */ addCoverageInstrumentation = stdenv: addAttrsToDerivation - { NIX_CFLAGS_COMPILE = "-O0 --coverage"; - - # This is an uberhack to prevent libtool from removing gcno - # files. This has been fixed in libtool, but there are - # packages out there with old ltmain.sh scripts. - # See http://www.mail-archive.com/libtool@gnu.org/msg10725.html + { postUnpack = '' + # This is an uberhack to prevent libtool from removing gcno + # files. This has been fixed in libtool, but there are + # packages out there with old ltmain.sh scripts. + # See http://www.mail-archive.com/libtool@gnu.org/msg10725.html for i in $(find -name ltmain.sh); do substituteInPlace $i --replace '*.$objext)' '*.$objext | *.gcno)' done + + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -O0 --coverage" ''; }