cross: confirm that qt5 module emulation is actually necessary

This commit is contained in:
Colin 2023-08-08 22:09:35 +00:00
parent 19f6a98d31
commit 006070d08f

View File

@ -1329,7 +1329,7 @@ in {
# qtdeclarative = emulateQtModule super.qtdeclarative; # qtdeclarative = emulateQtModule super.qtdeclarative;
# qtgraphicaleffects = emulateQtModule super.qtgraphicaleffects; # qtgraphicaleffects = emulateQtModule super.qtgraphicaleffects;
# qtimageformats = emulateQtModule super.qtimageformats; # qtimageformats = emulateQtModule super.qtimageformats;
# qtkeychain = emulateQtModule super.qtkeychain; # qtkeychain = emulateQtModule super.qtkeychain; #< doesn't exist?
# qtmultimedia = emulateQtModule super.qtmultimedia; # qtmultimedia = emulateQtModule super.qtmultimedia;
# qtquickcontrols = emulateQtModule super.qtquickcontrols; # qtquickcontrols = emulateQtModule super.qtquickcontrols;
# qtquickcontrols2 = emulateQtModule super.qtquickcontrols2; # qtquickcontrols2 = emulateQtModule super.qtquickcontrols2;
@ -1338,16 +1338,32 @@ in {
# qtwayland = emulateQtModule super.qtwayland; # qtwayland = emulateQtModule super.qtwayland;
# }); # });
qt5 = prev.qt5.override { # qt5 = let
# emulate qt5base and all qtModules. # emulatedQt5 = prev.qt5.override {
# because qt5 doesn't place this `stdenv` argument into its scope, `libsForQt5` doesn't inherit # # emulate qt5base and all qtModules.
# this stdenv. so anything using `libsForQt5.callPackage` builds w/o emulation. # # because qt5 doesn't place this `stdenv` argument into its scope, `libsForQt5` doesn't inherit
stdenv = final.stdenv // { # # this stdenv. so anything using `libsForQt5.callPackage` builds w/o emulation.
mkDerivation = args: emulateBuildMachine { # stdenv = final.stdenv // {
override = { stdenv }: stdenv.mkDerivation args; # mkDerivation = args: emulateBuildMachine {
}; # override = { stdenv }: stdenv.mkDerivation args;
}; # };
}; # };
# };
# in prev.qt5.overrideScope (self: super: {
# inherit (emulatedQt5)
# qtbase
# # without emulation these all fail with "Project ERROR: Cannot run compiler 'g++'."
# qtdeclarative
# qtgraphicaleffects
# qtimageformats
# qtmultimedia
# qtquickcontrols
# qtquickcontrols2
# qtsvg
# qttools
# qtwayland
# ;
# });
# qt5 = prev.qt5.overrideScope (self: super: { # qt5 = prev.qt5.overrideScope (self: super: {
# # stdenv.mkDerivation is used by qtModule, so this emulates all the qt modules # # stdenv.mkDerivation is used by qtModule, so this emulates all the qt modules