Another existing bug exposed by
514b00cf08: the build system was
interpolating an empty SDK directory and passing `-isysroot -g0`,
eating a compiler flag and breaking the build now that we don’t
pass a redundant `-isysroot` of our own.
Thankfully, with the new SDK pattern, we don’t need to do any of
this elaborate patching; just pointing it at the right tools from
`xcbuild` lets it figure everything out itself.
While the 14.4 SDK works to build the rest of Qt 5, building Qt
WebEngine fails with errors like the following:
In file included from gen/base/base_jumbo_37.cc:14:
In file included from ./../../3rdparty/chromium/base/mac/mach_port_rendezvous.cc:16:
In file included from ../../3rdparty/chromium/base/mac/foundation_util.h:34:
In file included from /nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39:
In file included from /nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
In file included from /nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:20:
/nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h:138:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'CFMutableStringRef'?
CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
^
/nix/store/sfdyfscmykycv7nfscn551lyl3gf4n27-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:500:70: note: 'CFMutableStringRef' declared here
typedef struct CF_BRIDGED_MUTABLE_TYPE(NSMutableString) __CFString * CFMutableStringRef;
^
Per upstream’s supported Darwin versions, built with the 14.4 SDK
(corresponding to Xcode 15) and a 10.14 deployment target. To ensure
that users of Qt have a compatible SDK and deployment target, propagate
the 10.14 SDK and a 10.14 minimum version. Users that need a newer
version can opt into using it by adding the SDK package to their build
inputs. aarch64-darwin uses 11.0 and 11.3 because those are the oldest
supported SDK and deployment target on that platform.
Note: upstream actually supports 10.13, but 10.14 was chosen as the
minimum and SDK because it ensures that automatic dark mode switching
works for x86_64-darwin users.
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Per the adjusted FFmpeg pinning advice, packages that work on the
default version should use the unversioned variants to ease the
migration to future versions and reduce the number of packages that
end up referencing old versions.
I have left HandBrake pinned as it builds a custom patched FFmpeg.
Always specify the postPhases attribute as a list instead of a string.
Append elements to the postPhases Bash variable using appendToVar
instead of string or Bash array concatenation.
Always specify the prePhases attribute as a list instead of a string.
Append elements to the prePhases Bash variable using appendToVar
instead of string or Bash array concatenation.
Thank you to the Arch package maintainer for incorporating the WebRTC
patches (which I had previously manually added) the day before I went
to clean this up for PRing!
Well, "fix", because this just allows us to use deprecated C++ features
for now, and the actual consumer of said features is boost 1.65.1,
vendored inside mapbox-gl, vendored inside qtlocation, with all the
upstreams in this chain being mostly dead.
Anyway, this should buy us time until the next libcxx bump comes around,
and then we'll have to send qt5location to a farm upstate unless someone
wants to go through the entire boost codebase and precision-upgrade it.