Merge pull request #264497 from reckenrode/qtwebengine-fix

This commit is contained in:
Randy Eckenrode
2023-11-01 08:01:17 -04:00
committed by GitHub
3 changed files with 29 additions and 4 deletions
+7 -1
View File
@@ -9,6 +9,7 @@
, gst_all_1
, libglvnd
, darwin
, overrideSDK
, buildPackages
, python3
@@ -141,13 +142,18 @@ let
qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
qtwebengine = callPackage ./modules/qtwebengine.nix {
inherit (darwin) bootstrap_cmds cctools xnu;
inherit (darwin.apple_sdk_11_0) libpm libunwind llvmPackages_14;
inherit (darwin.apple_sdk_11_0) libpm libunwind;
inherit (darwin.apple_sdk_11_0.libs) sandbox;
inherit (darwin.apple_sdk_11_0.frameworks)
AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback
GameController ImageCaptureCore LocalAuthentication
MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
ReplayKit SecurityInterface Vision;
qtModule = qtModule.override {
stdenv = if stdenv.isDarwin
then overrideSDK stdenv { darwinMinVersion = "10.13"; darwinSdkVersion = "11.0"; }
else stdenv;
};
xcbuild = buildPackages.xcbuild.override {
productBuildVer = "20A2408";
};
@@ -60,7 +60,6 @@
, mesa
, enableProprietaryCodecs ? true
# darwin
, llvmPackages_14
, bootstrap_cmds
, cctools
, xcbuild
@@ -106,7 +105,6 @@ qtModule {
gn
nodejs
] ++ lib.optionals stdenv.isDarwin [
llvmPackages_14.clang
bootstrap_cmds
cctools
xcbuild
+22 -1
View File
@@ -323,8 +323,27 @@ rec {
then sdk.frameworks."${framework}"
else replacePropagatedFrameworks pkg;
mapRuntimeToSDK = pkg:
# Only remap xcbuild for now, which exports the SDK used to build it.
if pkg != null && lib.getName pkg == "xcodebuild"
then pkg.override { stdenv = overrideSDK stdenv { inherit darwinMinVersion darwinSdkVersion; }; }
else pkg;
mapInputsToSDK = inputs: args:
lib.genAttrs inputs (input: map mapPackageToSDK (args."${input}" or [ ]));
let
runsAtBuild = lib.flip lib.elem [
"depsBuildBuild"
"depsBuildBuildPropagated"
"nativeBuildInputs"
"propagatedNativeBuildInputs"
"depsBuildTarget"
"depsBuildTargetPropagated"
];
atBuildInputs = lib.filter runsAtBuild inputs;
atRuntimeInputs = lib.subtractLists atBuildInputs inputs;
in
lib.genAttrs atRuntimeInputs (input: map mapPackageToSDK (args."${input}" or [ ]))
// lib.genAttrs atBuildInputs (input: map mapRuntimeToSDK (args."${input}" or [ ]));
mkCC = cc: cc.override {
bintools = cc.bintools.override { libc = sdk.Libsystem; };
@@ -343,6 +362,8 @@ rec {
extraBuildInputs = [sdk.frameworks.CoreFoundation ];
mkDerivationFromStdenv = extendMkDerivationArgs old (mapInputsToSDK [
"buildInputs"
"nativeBuildInputs"
"propagatedNativeBuildInputs"
]);
});
}