From 27353f135c645ae40ea87946da6ebdb7978599f4 Mon Sep 17 00:00:00 2001 From: eryngion Date: Thu, 7 Dec 2023 01:06:30 +0300 Subject: [PATCH] qt5.qtbase: fix mysql support for cross builds --- pkgs/development/libraries/qt-5/5.15/default.nix | 4 ++++ pkgs/development/libraries/qt-5/modules/qtbase.nix | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 420274b5b98d8..76528789b03cb 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -46,6 +46,10 @@ let ./qtbase.patch.d/0010-qtbase-assert.patch ./qtbase.patch.d/0011-fix-header_module.patch ./qtbase.patch.d/0015-qtbase-cross-build.patch + (fetchpatch { + url = "https://sources.debian.org/data/main/q/qtbase-opensource-src/5.15.8%2Bdfsg-11/debian/patches/cross_build_mysql.diff"; + hash = "sha256-tzmmLmMXmeDwRVjdpWekDJvSkrIIlslC12HP7XPcm3E="; + }) ]; qtdeclarative = [ ./qtdeclarative.patch diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 6e4fe01e42dc0..58a3d5d219bd7 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -20,8 +20,7 @@ # options , libGLSupported ? !stdenv.isDarwin , libGL - # qmake detection for libmysqlclient does not seem to work when cross compiling -, mysqlSupport ? stdenv.hostPlatform == stdenv.buildPlatform +, mysqlSupport ? true , libmysqlclient , buildExamples ? false , buildTests ? false @@ -393,8 +392,8 @@ stdenv.mkDerivation (finalAttrs: ({ "-I" "${cups.dev}/include" ] ++ lib.optionals (mysqlSupport) [ - "-L" "${libmysqlclient}/lib" - "-I" "${libmysqlclient}/include" + "-L" "${libmysqlclient}/lib/mysql" + "-I" "${libmysqlclient.dev}/include/mysql" ] # cross compilation options