Skip to content

Commit

Permalink
qt5.qtbase: fix mysql support for cross builds
Browse files Browse the repository at this point in the history
  • Loading branch information
eryngion authored and Artturin committed May 28, 2024
1 parent dbabeed commit 27353f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions pkgs/development/libraries/qt-5/modules/qtbase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 27353f1

Please sign in to comment.