diff options
author | Josef Kemetmueller <josef.kemetmueller@gmail.com> | 2017-09-12 00:53:30 +0200 |
---|---|---|
committer | Josef Kemetmueller <josef.kemetmueller@gmail.com> | 2017-09-15 14:55:38 +0200 |
commit | c71fd768225b8db59ab60ee4b0e64c2b771d5fd7 (patch) | |
tree | 776522f097b6a15f96221d5bc6a5feb4ca8363a9 /pkgs/development/tools/analysis/valgrind/default.nix | |
parent | eed14baec3db43df7294d3b549045c7298044eb4 (diff) | |
download | nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar.gz nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar.bz2 nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar.lz nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar.xz nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.tar.zst nixpkgs-c71fd768225b8db59ab60ee4b0e64c2b771d5fd7.zip |
valgrind: Fix darwin build
The bzero-patch was merged upstream in git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16103, so it does no longer apply. Additionally - to make the build succeed on darwin systems more recent than our nixpkgs.darwin.xnu kernel version - we need to teach the build the version of the xnu headers we provide, instead of letting the build figure out the actual system version using `uname -r`.
Diffstat (limited to 'pkgs/development/tools/analysis/valgrind/default.nix')
-rw-r--r-- | pkgs/development/tools/analysis/valgrind/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index 21dba34e884..875feea84d4 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -18,7 +18,15 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patches = stdenv.lib.optionals (stdenv.isDarwin) [ ./valgrind-bzero.patch ]; + preConfigure = stdenv.lib.optionalString stdenv.isDarwin ( + let OSRELEASE = '' + $(awk -F '"' '/#define OSRELEASE/{ print $2 }' \ + <${xnu}/Library/Frameworks/Kernel.framework/Headers/libkern/version.h)''; + in '' + echo "Don't derive our xnu version using uname -r." + substituteInPlace configure --replace "uname -r" "echo ${OSRELEASE}" + '' + ); postPatch = stdenv.lib.optionalString (stdenv.isDarwin) # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666). |