cmake: undo `/var/empty` workaround for Darwin SDK paths

With this workaround enabled, CMake looks for SDK headers and libraries
in `${SDKROOT}/var/empty`, which ensures it will not find them.
Disabling the workaround in just this case allows CMake’s SDK support to
work with the SDKs in nixpkgs while still not including other, impure
paths in its search paths.

+8
+8
pkgs/by-name/cm/cmake/package.nix
··· 181 181 sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile 182 182 ''; 183 183 184 + # Undo some of `fixCmakeFiles` for Darwin to make sure that checks for libraries in the SDK find them 185 + # (e.g., `find_library(MATH_LIBRARY m)` should find `$SDKROOT/usr/lib/libm.tbd`). 186 + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' 187 + substituteInPlace "$out/share/cmake-${lib.versions.majorMinor finalAttrs.version}/Modules/Platform/Darwin.cmake" \ 188 + --replace-fail '/var/empty/include' '/usr/include' \ 189 + --replace-fail '/var/empty/lib' '/usr/lib' 190 + ''; 191 + 184 192 dontUseCmakeConfigure = true; 185 193 enableParallelBuilding = true; 186 194