From 643f0b1829213cfdaaca6b40c97d7522d9b0058f Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 12 Aug 2024 11:47:03 +0300 Subject: [PATCH] qt6.qtdeclarative: slightly less bad hack to make it build on Darwin again --- .../development/libraries/qt-6/modules/qtdeclarative.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix index e1ed990dc0b3..2a377d481c3c 100644 --- a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -4,24 +4,27 @@ , qtshadertools , openssl , stdenv -, python3 , lib , pkgsBuildBuild }: qtModule { pname = "qtdeclarative"; - strictDeps = !stdenv.isDarwin; # fails to detect python3 otherwise + propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl ]; - nativeBuildInputs = [ python3 ]; + strictDeps = true; + patches = [ # prevent headaches from stale qmlcache data ../patches/0001-qtdeclarative-disable-qml-disk-cache.patch # add version specific QML import path ../patches/0002-qtdeclarative-also-use-versioned-qml-paths.patch ]; + cmakeFlags = [ "-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools" + # for some reason doesn't get found automatically on Darwin + "-DPython_EXECUTABLE=${lib.getExe pkgsBuildBuild.python3}" ] # Conditional is required to prevent infinite recursion during a cross build ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [