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, 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";
55 optionals stdenv.isDarwin [
56 ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
58 # Downgrade minimal required SDK to 10.12
59 ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch
60 ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch
62 # Patch framework detection to support X.framework/X.tbd,
63 # extending the current support for X.framework/X.
64 ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
67 ./qtbase.patch.d/0003-qtbase-mkspecs.patch
68 ./qtbase.patch.d/0004-qtbase-replace-libdir.patch
69 ./qtbase.patch.d/0005-qtbase-cmake.patch
70 ./qtbase.patch.d/0006-qtbase-gtk3.patch
71 ./qtbase.patch.d/0007-qtbase-xcursor.patch
72 ./qtbase.patch.d/0008-qtbase-tzdir.patch
73 ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
74 ./qtbase.patch.d/0010-qtbase-assert.patch
75 ./qtbase.patch.d/0011-fix-header_module.patch
77 qtdeclarative = [ ./qtdeclarative.patch ];
78 qtlocation = [ ./qtlocation-gcc-9.patch ];
79 qtscript = [ ./qtscript.patch ];
80 qtserialport = [ ./qtserialport.patch ];
82 # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599
84 name = "qtwebengine-bison-3.7-build.patch";
85 url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599";
86 sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy";
88 extraPrefix = "src/3rdparty/";
90 # Fix build with GCC 10 (part 1): https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=fad3e27b
92 name = "qtwebengine-gcc10-part1.patch";
93 url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=fad3e27bfb50d1e23a07577f087a826b5e00bb1d";
94 sha256 = "0c55j9zww8jyif6wl7jy1qqidgw9fdhiyfjgzhzi85r716m4pwwd";
96 extraPrefix = "src/3rdparty/";
98 # Fix build with GCC 10 (part 2): https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=193c5bed
100 name = "qtwebengine-gcc10-part2.patch";
101 url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=193c5bed1cff123e21b7e6d12f464d6709ace2e3";
102 sha256 = "1jb6s32ara6l4rbn4h3gg95mzv8sd8dl1zpjaqwywf1w7p8ymk86";
104 extraPrefix = "src/3rdparty/";
107 ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
110 name = "qtwebkit-bison-3.7-build.patch";
111 url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch";
112 sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n";
115 ./qtwebkit-icu68.patch
116 ] ++ optionals stdenv.isDarwin [
117 ./qtwebkit-darwin-no-readline.patch
118 ./qtwebkit-darwin-no-qos-classes.patch
120 qttools = [ ./qttools.patch ];
124 import ../qtModule.nix
128 # Use a variant of mkDerivation that does not include wrapQtApplications
129 # to avoid cyclic dependencies between Qt modules.
131 import ../mkDerivation.nix
132 { inherit lib; inherit debug; wrapQtAppsHook = null; }
133 stdenvActual.mkDerivation;
135 { inherit self srcs patches; };
137 addPackages = self: with self;
139 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
143 import ../mkDerivation.nix
144 { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
146 mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
148 qtbase = callPackage ../modules/qtbase.nix {
149 inherit (srcs.qtbase) src version;
150 patches = patches.qtbase;
151 inherit bison cups harfbuzz libGL;
152 withGtk3 = true; inherit dconf gtk3;
153 inherit debug developerBuild decryptSslTraffic;
156 qtcharts = callPackage ../modules/qtcharts.nix {};
157 qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
158 qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
159 qtdoc = callPackage ../modules/qtdoc.nix {};
160 qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
161 qtimageformats = callPackage ../modules/qtimageformats.nix {};
162 qtlocation = callPackage ../modules/qtlocation.nix {};
163 qtmacextras = callPackage ../modules/qtmacextras.nix {};
164 qtmultimedia = callPackage ../modules/qtmultimedia.nix {
165 inherit gstreamer gst-plugins-base;
167 qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
169 qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
170 qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
171 qtscript = callPackage ../modules/qtscript.nix {};
172 qtsensors = callPackage ../modules/qtsensors.nix {};
173 qtserialport = callPackage ../modules/qtserialport.nix {};
174 qtspeech = callPackage ../modules/qtspeech.nix {};
175 qtsvg = callPackage ../modules/qtsvg.nix {};
176 qtscxml = callPackage ../modules/qtscxml.nix {};
177 qttools = callPackage ../modules/qttools.nix {};
178 qttranslations = callPackage ../modules/qttranslations.nix {};
179 qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
180 qtwayland = callPackage ../modules/qtwayland.nix {};
181 qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
182 qtwebengine = callPackage ../modules/qtwebengine.nix {};
183 qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
184 qtwebkit = callPackage ../modules/qtwebkit.nix {};
185 qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
186 qtwebview = callPackage ../modules/qtwebview.nix {};
187 qtx11extras = callPackage ../modules/qtx11extras.nix {};
188 qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
190 env = callPackage ../qt-env.nix {};
191 full = env "qt-full-${qtbase.version}" ([
192 qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
193 qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
194 qtscript qtsensors qtserialport qtsvg qttools qttranslations
195 qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
196 qtwebview qtx11extras qtxmlpatterns
197 ] ++ optional (!stdenv.isDarwin) qtwayland
198 ++ optional (stdenv.isDarwin) qtmacextras);
200 qmake = makeSetupHook {
201 deps = [ self.qtbase.dev ];
204 fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
206 } ../hooks/qmake-hook.sh;
208 wrapQtAppsHook = makeSetupHook {
210 [ self.qtbase.dev makeWrapper ]
211 ++ optional stdenv.isLinux self.qtwayland.dev;
212 } ../hooks/wrap-qt-apps-hook.sh;
215 self = makeScope newScope addPackages;