···23# Updates
45-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`.
8-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.
1415*/
16···2829let
300031 qtCompatVersion = srcs.qtbase.version;
3233 stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
3435- mirror = "https://download.qt.io";
36- srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
37- # qtwebkit does not have an official release tarball on the qt mirror and is
38- # mostly maintained by the community.
39- qtwebkit = rec {
40- src = fetchFromGitHub {
41- owner = "qt";
42- repo = "qtwebkit";
43- rev = "v${version}";
44- sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg";
45- };
46- version = "5.212.0-alpha4";
47- };
48- qtwebengine =
49- let
50- branchName = "5.15.6";
51- rev = "v${branchName}-lts";
52- in
53- {
54- version = "${branchName}-${lib.substring 0 7 rev}";
55-56- src = fetchgit {
57- url = "https://github.com/qt/qtwebengine.git";
58- sha256 = "17bw9yf04zmr9ck5jkrd435c8b03zpf937vn2nwgsr8p78wkg3kr";
59- inherit rev branchName;
60- fetchSubmodules = true;
61- leaveDotGit = true;
62- name = "qtwebengine-${lib.substring 0 7 rev}.tar.gz";
63- postFetch = ''
64- # remove submodule .git directory
65- rm -rf "$out/src/3rdparty/.git"
66-67- # compress to not exceed the 2GB output limit
68- # try to make a deterministic tarball
69- tar -I 'gzip -n' \
70- --sort=name \
71- --mtime=1970-01-01 \
72- --owner=root --group=root \
73- --numeric-owner --mode=go=rX,u+rw,a-s \
74- --transform='s@^@source/@' \
75- -cf temp -C "$out" .
76- rm -r "$out"
77- mv temp "$out"
78- '';
79- };
80- };
81- };
82-83 patches = {
84 qtbase = lib.optionals stdenv.isDarwin [
85 ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
···107 ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
108 ./qtbase.patch.d/0010-qtbase-assert.patch
109 ./qtbase.patch.d/0011-fix-header_module.patch
110- (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/339323 is included in an release.
111- name = "0014-gcc11-compat.patch";
112- url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=049e14870c13235cd066758f29c42dc96c1ccdf8";
113- sha256 = "1cb2hwi859hds0fa2cbap014qaa7mah9p0rcxcm2cvj2ybl33qfc";
114- })
115- (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/363880/3 is included in an release.
116- name = "qtbase-mysql-version-vs-functionality-check.patch";
117- url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=211369133cf40b2f522caaff259c19069ed23ca4";
118- sha256 = "19kq9h10qm344fpdqa9basrbzh1y5kr48c6jzz3nvk61pk4ja1k4";
119- })
120 ];
121 qtdeclarative = [ ./qtdeclarative.patch ];
122 qtscript = [ ./qtscript.patch ];
···23# Updates
45+Run `./fetch.sh` to update package sources from Git.
6+Check for any minor version changes.
000000078*/
9···2122let
2324+ srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; };
25+26 qtCompatVersion = srcs.qtbase.version;
2728 stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
2900000000000000000000000000000000000000000000000030 patches = {
31 qtbase = lib.optionals stdenv.isDarwin [
32 ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
···54 ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
55 ./qtbase.patch.d/0010-qtbase-assert.patch
56 ./qtbase.patch.d/0011-fix-header_module.patch
000000000057 ];
58 qtdeclarative = [ ./qtdeclarative.patch ];
59 qtscript = [ ./qtscript.patch ];
+17-2
pkgs/development/libraries/qt-5/5.15/fetch.sh
···1-WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ \
2- -A '*.tar.xz' )
000000000000000
···115 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake
116 sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in
117 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
00118 '' + (
119 if stdenv.isDarwin then ''
120 sed -i \
···149 ''}
150151 NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
00152 '';
153154 postConfigure = ''
···115 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake
116 sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in
117 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
118+ '' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
119+ patchShebangs ./bin
120 '' + (
121 if stdenv.isDarwin then ''
122 sed -i \
···151 ''}
152153 NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
154+ '' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
155+ ./bin/syncqt.pl -version $version
156 '';
157158 postConfigure = ''
+17
pkgs/development/libraries/qt-5/qtModule.nix
···31 ${args.preConfigure or ""}
3233 fixQtBuiltinPaths . '*.pr?'
0000000000000000034 '';
3536 dontWrapQtApps = args.dontWrapQtApps or true;
···31 ${args.preConfigure or ""}
3233 fixQtBuiltinPaths . '*.pr?'
34+ '' + lib.optionalString (builtins.compareVersions "5.15.0" version <= 0)
35+ # Note: We use ${version%%-*} to remove any tag from the end of the version
36+ # string. Version tags are added by Nixpkgs maintainers and not reflected in
37+ # the source version.
38+ ''
39+ if [[ -z "$dontCheckQtModuleVersion" ]] \
40+ && grep -q '^MODULE_VERSION' .qmake.conf 2>/dev/null \
41+ && ! grep -q -F "''${version%%-*}" .qmake.conf 2>/dev/null
42+ then
43+ echo >&2 "error: could not find version ''${version%%-*} in .qmake.conf"
44+ echo >&2 "hint: check .qmake.conf and update the package version in Nixpkgs"
45+ exit 1
46+ fi
47+48+ if [[ -z "$dontSyncQt" && -f sync.profile ]]; then
49+ syncqt.pl -version "''${version%%-*}"
50+ fi
51 '';
5253 dontWrapQtApps = args.dontWrapQtApps or true;