-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt{5,6}: update for the new Darwin SDK #347216
Changes from all commits
578b04c
4bb131e
ab80059
61d0e51
830b9fe
4ad6c7f
4ec8351
0725c33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez, IOBluetooth }: | ||
{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez }: | ||
|
||
qtModule { | ||
pname = "qtconnectivity"; | ||
buildInputs = lib.optional stdenv.hostPlatform.isLinux bluez; | ||
propagatedBuildInputs = [ | ||
qtbase | ||
qtdeclarative | ||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ | ||
IOBluetooth | ||
]; | ||
outputs = [ "out" "dev" "bin" ]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ lib, stdenv, qtModule, qtbase, qtdeclarative, GameController, pkg-config }: | ||
{ qtModule, qtbase, qtdeclarative, pkg-config }: | ||
|
||
qtModule { | ||
pname = "qtgamepad"; | ||
propagatedBuildInputs = [ qtbase qtdeclarative ] | ||
++ lib.optional stdenv.hostPlatform.isDarwin GameController; | ||
propagatedBuildInputs = [ qtbase qtdeclarative ]; | ||
nativeBuildInputs = [ pkg-config ]; | ||
outputs = [ "out" "dev" "bin" ]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
{ stdenv | ||
, lib | ||
, qtModule | ||
, qtbase | ||
, qtdeclarative | ||
, StoreKit | ||
, Foundation | ||
}: | ||
{ qtModule, qtbase, qtdeclarative }: | ||
|
||
qtModule { | ||
pname = "qtpurchasing"; | ||
propagatedBuildInputs = [ qtbase qtdeclarative ]; | ||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation StoreKit ]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,7 @@ | |
, systemd | ||
, enableProprietaryCodecs ? true | ||
, gn | ||
, cctools, libobjc, libpm, libunwind, sandbox, xnu | ||
, ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit | ||
, ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication | ||
, MediaPlayer, MediaAccessibility, SecurityInterface, Vision, CoreML, OpenDirectory, Accelerate | ||
, cups, openbsm, xcbuild, writeScriptBin | ||
, apple-sdk_13, cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin | ||
, ffmpeg ? null | ||
, lib, stdenv | ||
, version ? null | ||
|
@@ -55,7 +51,8 @@ let | |
|
||
in | ||
|
||
qtModule ({ | ||
# Override the SDK because Qt WebEngine doesn’t seem to build using the 14.4 SDK. | ||
(qtModule.override { apple-sdk_for_qt = apple-sdk_13; }) ({ | ||
pname = "qtwebengine"; | ||
nativeBuildInputs = [ | ||
bison flex git gperf ninja pkg-config (python.withPackages(ps: [ ps.html5lib ])) which gn nodejs | ||
|
@@ -65,7 +62,7 @@ qtModule ({ | |
pkgsBuildBuild.pkg-config | ||
(lib.getDev pkgsBuildTarget.targetPackages.qt5.qtquickcontrols) | ||
pkg-config-wrapped-without-prefix | ||
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; | ||
] ++ lib.optional stdenv.hostPlatform.isDarwin [ bootstrap_cmds xcbuild ]; | ||
doCheck = true; | ||
outputs = [ "bin" "dev" "out" ]; | ||
|
||
|
@@ -158,22 +155,6 @@ qtModule ({ | |
substituteInPlace src/buildtools/config/mac_osx.pri \ | ||
--replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' | ||
|
||
# Following is required to prevent a build error: | ||
# ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it | ||
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \ | ||
--replace '$sysroot/usr' "${xnu}" | ||
|
||
# Apple has some secret stuff they don't share with OpenBSM | ||
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \ | ||
--replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]" | ||
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \ | ||
--replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]" | ||
|
||
# ld: warning: directory not found for option '-L/nix/store/...-xcodebuild-0.1.2-pre/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib' | ||
# ld: fatal warning(s) induced error (-fatal_warnings) | ||
substituteInPlace src/3rdparty/chromium/build/config/compiler/BUILD.gn \ | ||
--replace "-Wl,-fatal_warnings" "" | ||
|
||
# Use system ffmpeg | ||
echo "gn_args += use_system_ffmpeg=true" >> src/core/config/mac_osx.pri | ||
echo "LIBS += -lavformat -lavcodec -lavutil" >> src/core/core_common.pri | ||
|
@@ -257,40 +238,10 @@ qtModule ({ | |
|
||
# FIXME These dependencies shouldn't be needed but can't find a way | ||
# around it. Chromium pulls this in while bootstrapping GN. | ||
++ lib.optionals stdenv.hostPlatform.isDarwin [ | ||
libobjc | ||
cctools | ||
|
||
# frameworks | ||
ApplicationServices | ||
AVFoundation | ||
Foundation | ||
ForceFeedback | ||
GameController | ||
AppKit | ||
ImageCaptureCore | ||
CoreBluetooth | ||
IOBluetooth | ||
CoreWLAN | ||
Quartz | ||
Cocoa | ||
LocalAuthentication | ||
MediaPlayer | ||
MediaAccessibility | ||
SecurityInterface | ||
Vision | ||
CoreML | ||
OpenDirectory | ||
Accelerate | ||
|
||
openbsm | ||
libunwind | ||
]; | ||
++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools.libtool ]; | ||
Comment on lines
239
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment seems probably inaccurate now? Though I don’t really know what it meant to begin with. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m seeing if I can drop it now that xcbuild includes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I meant this comment that I don’t really understand: # FIXME These dependencies shouldn't be needed but can't find a way
# around it. Chromium pulls this in while bootstrapping GN. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m seeing if I can go one step further and delete the whole thing. If not, I’ll drop or change the comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope. Deleting those would be non-trivial. It requires replacing the qtbase mkspecs patches with different patches to use xcbuild. If someone wants to do that later, that’s fine; but it’s beyond the scope of what I want to do with this PR (which is clean things up and use the new SDK). |
||
|
||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ | ||
cups | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I wonder if it just needs the headers?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For CUPS? CUPS headers are propagated by the SDK now. I wonder if Chromium is detecting CUPS support due to that. |
||
libpm | ||
sandbox | ||
|
||
# `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py` | ||
# to get some information about the host platform. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
{ lib, stdenv, qtModule, qtdeclarative, qtwebengine, CoreFoundation, WebKit }: | ||
{ lib, stdenv, qtModule, qtdeclarative, qtwebengine }: | ||
|
||
qtModule { | ||
pname = "qtwebview"; | ||
propagatedBuildInputs = [ qtdeclarative qtwebengine ]; | ||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ | ||
CoreFoundation | ||
WebKit | ||
]; | ||
outputs = [ "out" "dev" "bin" ]; | ||
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework WebKit"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also use lib.getExe'