diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch new file mode 100644 index 000000000000..0ef710fa0195 --- /dev/null +++ b/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -0,0 +1,16 @@ +diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx +index 2008a0b..5a3e8ee 100644 +--- a/Source/cmGlobalXCodeGenerator.cxx ++++ b/Source/cmGlobalXCodeGenerator.cxx +@@ -35,11 +35,6 @@ + + struct cmLinkImplementation; + +-#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__) +-#define HAVE_APPLICATION_SERVICES +-#include +-#endif +- + #if defined(CMAKE_BUILD_WITH_CMAKE) + #include "cmXMLParser.h" + diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 4675014880ba..051b8107703d 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -57,6 +57,8 @@ stdenv.mkDerivation rec { # Don't search in non-Nix locations such as /usr, but do search in our libc. patches = [ ./search-path-3.9.patch ] + # Don't depend on frameworks. + ++ optional useSharedLibraries ./application-services.patch # TODO: remove conditional ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch; outputs = [ "out" ]; @@ -101,7 +103,9 @@ stdenv.mkDerivation rec { "-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" "-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" "-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" - ] ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ]; + ] + # Avoid depending on frameworks. + ++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF"; dontUseCmakeConfigure = true; enableParallelBuilding = true;