summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-30 14:10:52 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-30 14:10:52 +0000
commit0196bb720e5a0a4fa12634387ffb002141cf318d (patch)
tree7e468451d79b2c4899b247e2179dc4748b4ea243 /pkgs/stdenv
parentf7cfcbd1f9bddb8ad6f99c9e8cb1a91ff5dd30ac (diff)
downloadnixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar.gz
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar.bz2
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar.lz
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar.xz
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.tar.zst
nixlib-0196bb720e5a0a4fa12634387ffb002141cf318d.zip
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
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/adapters.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 16597d70c1ac..5e135524af9b 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"
           '';
       }