cmake: drop outdated flags from setupHook#455592
Conversation
This was introduced in NixOS#37015, before the migration of Apple SDK frameworks to be included by default. More specifically, it breaks anything looking for `Network.framework` (such as qtbase 6.10) because it will prefer `libnetwork.tbd` over the framework. Fixes NixOS#455059. Supersedes NixOS#455458.
This policy was introduced in CMake 3.0 (June 2014), and removed entirely in CMake 4.0. As this causes a world-rebuild we'd probably leave it alone except that I'm already changing the setup hook.
|
This would mean that Qt would stay broken until next staging merge right? |
Yeah. If it's critical that Qt be fixed before that we could add (I'm reading that paragraph and it sounds dismissive, which is not how I meant it! My point is just that I don't have the knowledge or authority to decide whether a PR doing the smaller-scale fix would be accepted, but such a PR is definitely possible). |
This essentially applies NixOS#455592 to qtbase (and thus all packages depending on Qt on Darwin) without rebuilding the world. We're doing this so that Qt-based applications will be fixed faster than the time it takes to wait for a staging cycle.
Drop outdated CMake flags from the setup hook.
The first (
CMAKE_FIND_FRAMEWORK=LAST) is actively wrong now that we include the SDK and all its component frameworks in the Darwin stdenv by default (see #455458, which this PR supersedes).The second (
CMAKE_POLICY_DEFAULT_CMP0025=NEW) is just irrelevant with acmake_minimum_requiredof 3.0 or higher (the minimum version supported by the version of CMake in nixpkgs is above this), and the policy was entirely dropped in CMake 4.0, so it can no longer even be set to theOLDbehavior. We probably wouldn't bother removing this on its own, but since I'm causing a world-rebuild anyway, here we are.Closes #455059.
Supersedes #455458.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.