5 Before a major version update, make a copy of this directory. (We like to
6 keep the old version around for a short time after major updates.) Add a
7 top-level attribute to `top-level/all-packages.nix`.
9 1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`.
10 2. From the top of the Nixpkgs tree, run
11 `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION`.
12 3. Check that the new packages build correctly.
13 4. Commit the changes and open a pull request.
19 lib, stdenv, fetchurl, fetchpatch, fetchgit, fetchFromGitHub, makeSetupHook, makeWrapper,
20 bison, cups ? null, harfbuzz, libGL, perl,
21 gstreamer, gst-plugins-base, gtk3, dconf,
25 developerBuild ? false,
26 decryptSslTraffic ? false,
34 qtCompatVersion = srcs.qtbase.version;
36 stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
38 mirror = "https://download.qt.io";
39 srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
40 # qtwebkit does not have an official release tarball on the qt mirror and is
41 # mostly maintained by the community.
43 src = fetchFromGitHub {
47 sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg";
49 version = "5.212.0-alpha4";
52 # Even if developed in the public, QtWebEngine does not have official
53 # releases or new tags since the Qt company made 5.15.3 proprietary.
54 # Apparently they care more about licensing than the security of their users.
55 # See https://lists.qt-project.org/pipermail/interest/2021-March/036387.html
58 branchName = "5.15.3";
59 rev = "a059e7404a6db799f4da0ad696e65ae9c854b4b0";
62 version = "${branchName}-${lib.substring 0 7 rev}";
65 url = "https://github.com/qt/qtwebengine.git";
66 sha256 = "1vdgxfbmx4z4qrm2g61dl64gqn3fv5f83jwpp7h1gyfx5z2qvfmv";
67 inherit rev branchName;
68 fetchSubmodules = true;
70 name = "qtwebengine-${substring 0 7 rev}.tar.gz";
72 # remove submodule .git directory
73 rm -rf $out/src/3rdparty/.git
75 # compress to not exceed the 2GB output limit
77 # try to make a deterministic tarball
81 --owner=root --group=root \
82 --numeric-owner --mode=go=rX,u+rw,a-s \
91 optionals stdenv.isDarwin [
92 ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
94 # Downgrade minimal required SDK to 10.12
95 ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch
96 ./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch
97 ./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch
98 ./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch
99 ./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch
100 ./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch
101 ./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch
102 ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch
104 # Patch framework detection to support X.framework/X.tbd,
105 # extending the current support for X.framework/X.
106 ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
109 ./qtbase.patch.d/0003-qtbase-mkspecs.patch
110 ./qtbase.patch.d/0004-qtbase-replace-libdir.patch
111 ./qtbase.patch.d/0005-qtbase-cmake.patch
112 ./qtbase.patch.d/0006-qtbase-gtk3.patch
113 ./qtbase.patch.d/0007-qtbase-xcursor.patch
114 ./qtbase.patch.d/0008-qtbase-tzdir.patch
115 ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
116 ./qtbase.patch.d/0010-qtbase-assert.patch
117 ./qtbase.patch.d/0011-fix-header_module.patch
119 qtdeclarative = [ ./qtdeclarative.patch ];
120 qtscript = [ ./qtscript.patch ];
121 qtserialport = [ ./qtserialport.patch ];
123 # Fix crashes with non en_US.UTF-8 locales
125 url = "https://github.com/qt/qtwebengine/commit/199ea00a9eea13315a652c62778738629185b059.patch";
126 sha256 = "1b5k2g1v8913cvsgvp6ja4mcprjlk5vcwqzi0p1qq7b1wyi4f0g2";
128 ] ++ optionals stdenv.isDarwin [
129 ./qtwebengine-darwin-no-platform-check.patch
130 ./qtwebengine-mac-dont-set-dsymutil-path.patch
134 name = "qtwebkit-bison-3.7-build.patch";
135 url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch";
136 sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n";
139 ./qtwebkit-icu68.patch
140 ] ++ optionals stdenv.isDarwin [
141 ./qtwebkit-darwin-no-readline.patch
142 ./qtwebkit-darwin-no-qos-classes.patch
144 qttools = [ ./qttools.patch ];
148 import ../qtModule.nix
152 # Use a variant of mkDerivation that does not include wrapQtApplications
153 # to avoid cyclic dependencies between Qt modules.
155 import ../mkDerivation.nix
156 { inherit lib; inherit debug; wrapQtAppsHook = null; }
157 stdenvActual.mkDerivation;
159 { inherit self srcs patches; };
161 addPackages = self: with self;
163 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
167 import ../mkDerivation.nix
168 { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
170 mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
172 qtbase = callPackage ../modules/qtbase.nix {
173 inherit (srcs.qtbase) src version;
174 patches = patches.qtbase;
175 inherit bison cups harfbuzz libGL;
176 withGtk3 = true; inherit dconf gtk3;
177 inherit developerBuild decryptSslTraffic;
180 qtcharts = callPackage ../modules/qtcharts.nix {};
181 qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
182 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
183 qtdoc = callPackage ../modules/qtdoc.nix {};
184 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
185 qtimageformats = callPackage ../modules/qtimageformats.nix {};
186 qtlocation = callPackage ../modules/qtlocation.nix {};
187 qtmacextras = callPackage ../modules/qtmacextras.nix {};
188 qtmultimedia = callPackage ../modules/qtmultimedia.nix {
189 inherit gstreamer gst-plugins-base;
191 qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
193 qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
194 qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
195 qtscript = callPackage ../modules/qtscript.nix {};
196 qtsensors = callPackage ../modules/qtsensors.nix {};
197 qtserialport = callPackage ../modules/qtserialport.nix {};
198 qtspeech = callPackage ../modules/qtspeech.nix {};
199 qtsvg = callPackage ../modules/qtsvg.nix {};
200 qtscxml = callPackage ../modules/qtscxml.nix {};
201 qttools = callPackage ../modules/qttools.nix {};
202 qttranslations = callPackage ../modules/qttranslations.nix {};
203 qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
204 qtwayland = callPackage ../modules/qtwayland.nix {};
205 qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
206 qtwebengine = callPackage ../modules/qtwebengine.nix {
207 inherit (srcs.qtwebengine) version;
209 qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
210 qtwebkit = callPackage ../modules/qtwebkit.nix {};
211 qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
212 qtwebview = callPackage ../modules/qtwebview.nix {};
213 qtx11extras = callPackage ../modules/qtx11extras.nix {};
214 qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
216 env = callPackage ../qt-env.nix {};
217 full = env "qt-full-${qtbase.version}" ([
218 qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
219 qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
220 qtscript qtsensors qtserialport qtsvg qttools qttranslations
221 qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
222 qtwebview qtx11extras qtxmlpatterns
223 ] ++ optional (!stdenv.isDarwin) qtwayland
224 ++ optional (stdenv.isDarwin) qtmacextras);
226 qmake = makeSetupHook {
227 deps = [ self.qtbase.dev ];
230 fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
232 } ../hooks/qmake-hook.sh;
234 wrapQtAppsHook = makeSetupHook {
236 [ self.qtbase.dev makeWrapper ]
237 ++ optional stdenv.isLinux self.qtwayland.dev;
238 } ../hooks/wrap-qt-apps-hook.sh;
241 self = makeScope newScope addPackages;