5 generateSplicesForMkScope,
6 makeScopeWithSplicing',
23 srcs = import ./srcs.nix {
25 mirror = "mirror://qt";
31 callPackage = self.newScope ({
32 inherit (self) qtModule;
33 inherit srcs python3 stdenv;
36 # Per <https://doc.qt.io/qt-6/macos.html#supported-versions>.
37 # This should reflect the highest “Build Environment” and the
38 # lowest “Target Platform”.
39 darwinVersionInputs = [
41 (darwinMinVersionHook "12.0")
47 drv' = drv.__spliced.targetTarget or drv;
48 inherit (self.qtbase) qtPluginPrefix qtQmlPrefix;
50 (runCommand "${drv'.name}-only-plugins-qml" { } ''
51 mkdir -p $(dirname "$out/${qtPluginPrefix}")
52 test -d "${drv'}/${qtPluginPrefix}" && ln -s "${drv'}/${qtPluginPrefix}" "$out/${qtPluginPrefix}" || true
53 test -d "${drv'}/${qtQmlPrefix}" && ln -s "${drv'}/${qtQmlPrefix}" "$out/${qtQmlPrefix}" || true
58 inherit callPackage srcs darwinVersionInputs;
60 qtModule = callPackage ./qtModule.nix {
61 inherit darwinVersionInputs;
64 qtbase = callPackage ./modules/qtbase {
65 withGtk3 = !stdenv.hostPlatform.isMinGW;
66 inherit darwinVersionInputs;
67 inherit (srcs.qtbase) src version;
69 env = callPackage ./qt-env.nix { };
72 env "qt-full-${qtbase.version}"
73 # `with self` is ok to use here because having these spliced is unnecessary
115 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
122 qt3d = callPackage ./modules/qt3d.nix { };
123 qt5compat = callPackage ./modules/qt5compat.nix { };
124 qtcharts = callPackage ./modules/qtcharts.nix { };
125 qtconnectivity = callPackage ./modules/qtconnectivity.nix { };
126 qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
127 qtdeclarative = callPackage ./modules/qtdeclarative { };
128 qtdoc = callPackage ./modules/qtdoc.nix { };
129 qtgraphs = callPackage ./modules/qtgraphs.nix { };
130 qtgrpc = callPackage ./modules/qtgrpc.nix { };
131 qthttpserver = callPackage ./modules/qthttpserver.nix { };
132 qtimageformats = callPackage ./modules/qtimageformats.nix { };
133 qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { };
134 qtlocation = callPackage ./modules/qtlocation.nix { };
135 qtlottie = callPackage ./modules/qtlottie.nix { };
136 qtmultimedia = callPackage ./modules/qtmultimedia {
146 qtmqtt = callPackage ./modules/qtmqtt.nix { };
147 qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { };
148 qtpositioning = callPackage ./modules/qtpositioning.nix { };
149 qtsensors = callPackage ./modules/qtsensors.nix { };
150 qtserialbus = callPackage ./modules/qtserialbus.nix { };
151 qtserialport = callPackage ./modules/qtserialport.nix { };
152 qtshadertools = callPackage ./modules/qtshadertools.nix { };
153 qtspeech = callPackage ./modules/qtspeech.nix { };
154 qtquick3d = callPackage ./modules/qtquick3d.nix { };
155 qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { };
156 qtquickeffectmaker = callPackage ./modules/qtquickeffectmaker.nix { };
157 qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { };
158 qtremoteobjects = callPackage ./modules/qtremoteobjects.nix { };
159 qtsvg = callPackage ./modules/qtsvg.nix { };
160 qtscxml = callPackage ./modules/qtscxml.nix { };
161 qttools = callPackage ./modules/qttools { };
162 qttranslations = callPackage ./modules/qttranslations.nix { };
163 qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { };
164 qtwayland = callPackage ./modules/qtwayland.nix { };
165 qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
166 qtwebengine = callPackage ./modules/qtwebengine {
167 inherit (darwin) bootstrap_cmds;
169 qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
170 qtwebview = callPackage ./modules/qtwebview.nix { };
172 wrapQtAppsHook = callPackage (
179 name = "wrap-qt6-apps-hook";
180 propagatedBuildInputs = [ makeBinaryWrapper ];
181 depsTargetTargetPropagated =
183 (onlyPluginsAndQml qtbase)
185 ++ lib.optionals (lib.meta.availableOn stdenv.targetPlatform qtwayland) [
186 (onlyPluginsAndQml qtwayland)
188 } ./hooks/wrap-qt-apps-hook.sh
191 wrapQtAppsNoGuiHook = callPackage (
192 { makeBinaryWrapper, qtbase }:
194 name = "wrap-qt6-apps-no-gui-hook";
195 propagatedBuildInputs = [ makeBinaryWrapper ];
196 depsTargetTargetPropagated = [
197 (onlyPluginsAndQml qtbase)
199 } ./hooks/wrap-qt-apps-hook.sh
202 qmake = callPackage (
205 name = "qmake6-hook";
206 propagatedBuildInputs = [ qtbase.dev ];
208 fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh;
210 } ./hooks/qmake-hook.sh
214 baseScope = makeScopeWithSplicing' {
215 otherSplices = generateSplicesForMkScope "qt6";
219 bootstrapScope = baseScope.overrideScope (
221 qtbase = prev.qtbase.override { qttranslations = null; };
222 qtdeclarative = null;
226 finalScope = baseScope.overrideScope (
228 qttranslations = bootstrapScope.qttranslations;