about summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-4.x/4.8/default.nix
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-11-29 08:57:53 +0000
committerGitHub <noreply@github.com>2021-11-29 03:57:53 -0500
commit2d4606a32d27b5c1429574dc72487490206b5aa8 (patch)
tree7ce24843a71722673e03c587e7ea5376962c234e /pkgs/development/libraries/qt-4.x/4.8/default.nix
parentd57f82e306a86458b06534f6e2f5f9948c30afd7 (diff)
qt4: pull upstream fix for gcc-11 (#147555)
Without the change the build on `gcc-11` fails as:

    $ nix build --impure --expr 'with import ./. {}; qt4.override { stdenv = gcc11Stdenv; }' -L
    ...
    messagemodel.cpp: In function 'int calcMergeScore(const DataModel*, const DataModel*)':
    messagemodel.cpp:186:61: error: ordered comparison of pointer with integer zero ('MessageItem*' and 'int')
      186 |                 if (c->findMessage(m->text(), m->comment()) >= 0)
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
Diffstat (limited to 'pkgs/development/libraries/qt-4.x/4.8/default.nix')
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix
index 5856e0b84b5c6..36f4377727aa6 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix
@@ -97,6 +97,16 @@ stdenv.mkDerivation rec {
           + "0d4a3dd61ccb156dee556c214dbe91c04d44a717/debian/patches/gcc9-qforeach.patch";
         sha256 = "0dzn6qxrgxb75rvck9kmy5gspawdn970wsjw56026dhkih8cp3pg";
       })
+
+      # Pull upstream fix for gcc-11 support.
+      (fetchpatch {
+        name = "gcc11-ptr-cmp.patch";
+        url = "https://github.com/qt/qttools/commit/7138c963f9d1258bc1b49cb4d63c3e2b7d0ccfda.patch";
+        sha256 = "1a9g05r267c94qpw3ssb6k4lci200vla3vm5hri1nna6xwdsmrhc";
+        # "src/" -> "tools/"
+        stripLen = 2;
+        extraPrefix = "tools/";
+      })
     ]
     ++ lib.optional gtkStyle (substituteAll ({
         src = ./dlopen-gtkstyle.diff;