···2233# Updates
4455-Before a major version update, make a copy of this directory. (We like to
66-keep the old version around for a short time after major updates.) Add a
77-top-level attribute to `top-level/all-packages.nix`.
88-99-1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`.
1010-2. From the top of the Nixpkgs tree, run
1111- `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION`.
1212-3. Check that the new packages build correctly.
1313-4. Commit the changes and open a pull request.
55+Run `./fetch.sh` to update package sources from Git.
66+Check for any minor version changes.
147158*/
169···28212922let
30232424+ srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; };
2525+3126 qtCompatVersion = srcs.qtbase.version;
32273328 stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
34293535- mirror = "https://download.qt.io";
3636- srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
3737- # qtwebkit does not have an official release tarball on the qt mirror and is
3838- # mostly maintained by the community.
3939- qtwebkit = rec {
4040- src = fetchFromGitHub {
4141- owner = "qt";
4242- repo = "qtwebkit";
4343- rev = "v${version}";
4444- sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg";
4545- };
4646- version = "5.212.0-alpha4";
4747- };
4848- qtwebengine =
4949- let
5050- branchName = "5.15.6";
5151- rev = "v${branchName}-lts";
5252- in
5353- {
5454- version = "${branchName}-${lib.substring 0 7 rev}";
5555-5656- src = fetchgit {
5757- url = "https://github.com/qt/qtwebengine.git";
5858- sha256 = "17bw9yf04zmr9ck5jkrd435c8b03zpf937vn2nwgsr8p78wkg3kr";
5959- inherit rev branchName;
6060- fetchSubmodules = true;
6161- leaveDotGit = true;
6262- name = "qtwebengine-${lib.substring 0 7 rev}.tar.gz";
6363- postFetch = ''
6464- # remove submodule .git directory
6565- rm -rf "$out/src/3rdparty/.git"
6666-6767- # compress to not exceed the 2GB output limit
6868- # try to make a deterministic tarball
6969- tar -I 'gzip -n' \
7070- --sort=name \
7171- --mtime=1970-01-01 \
7272- --owner=root --group=root \
7373- --numeric-owner --mode=go=rX,u+rw,a-s \
7474- --transform='s@^@source/@' \
7575- -cf temp -C "$out" .
7676- rm -r "$out"
7777- mv temp "$out"
7878- '';
7979- };
8080- };
8181- };
8282-8330 patches = {
8431 qtbase = lib.optionals stdenv.isDarwin [
8532 ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
···10754 ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
10855 ./qtbase.patch.d/0010-qtbase-assert.patch
10956 ./qtbase.patch.d/0011-fix-header_module.patch
110110- (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/339323 is included in an release.
111111- name = "0014-gcc11-compat.patch";
112112- url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=049e14870c13235cd066758f29c42dc96c1ccdf8";
113113- sha256 = "1cb2hwi859hds0fa2cbap014qaa7mah9p0rcxcm2cvj2ybl33qfc";
114114- })
115115- (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/363880/3 is included in an release.
116116- name = "qtbase-mysql-version-vs-functionality-check.patch";
117117- url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=211369133cf40b2f522caaff259c19069ed23ca4";
118118- sha256 = "19kq9h10qm344fpdqa9basrbzh1y5kr48c6jzz3nvk61pk4ja1k4";
119119- })
12057 ];
12158 qtdeclarative = [ ./qtdeclarative.patch ];
12259 qtscript = [ ./qtscript.patch ];
···115115 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake
116116 sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in
117117 sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
118118+ '' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
119119+ patchShebangs ./bin
118120 '' + (
119121 if stdenv.isDarwin then ''
120122 sed -i \
···149151 ''}
150152151153 NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
154154+ '' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
155155+ ./bin/syncqt.pl -version $version
152156 '';
153157154158 postConfigure = ''
+17
pkgs/development/libraries/qt-5/qtModule.nix
···3131 ${args.preConfigure or ""}
32323333 fixQtBuiltinPaths . '*.pr?'
3434+ '' + lib.optionalString (builtins.compareVersions "5.15.0" version <= 0)
3535+ # Note: We use ${version%%-*} to remove any tag from the end of the version
3636+ # string. Version tags are added by Nixpkgs maintainers and not reflected in
3737+ # the source version.
3838+ ''
3939+ if [[ -z "$dontCheckQtModuleVersion" ]] \
4040+ && grep -q '^MODULE_VERSION' .qmake.conf 2>/dev/null \
4141+ && ! grep -q -F "''${version%%-*}" .qmake.conf 2>/dev/null
4242+ then
4343+ echo >&2 "error: could not find version ''${version%%-*} in .qmake.conf"
4444+ echo >&2 "hint: check .qmake.conf and update the package version in Nixpkgs"
4545+ exit 1
4646+ fi
4747+4848+ if [[ -z "$dontSyncQt" && -f sync.profile ]]; then
4949+ syncqt.pl -version "''${version%%-*}"
5050+ fi
3451 '';
35523653 dontWrapQtApps = args.dontWrapQtApps or true;