about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
index 697556e30edc..e1ed990dc0b3 100644
--- a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
@@ -3,16 +3,28 @@
 , qtlanguageserver
 , qtshadertools
 , openssl
+, stdenv
 , python3
+, lib
+, pkgsBuildBuild
 }:
 
 qtModule {
   pname = "qtdeclarative";
-  propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl python3 ];
+  strictDeps = !stdenv.isDarwin; # fails to detect python3 otherwise
+  propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl ];
+  nativeBuildInputs = [ python3 ];
   patches = [
     # prevent headaches from stale qmlcache data
-    ../patches/qtdeclarative-default-disable-qmlcache.patch
+    ../patches/0001-qtdeclarative-disable-qml-disk-cache.patch
     # add version specific QML import path
-    ../patches/qtdeclarative-qml-paths.patch
+    ../patches/0002-qtdeclarative-also-use-versioned-qml-paths.patch
+  ];
+  cmakeFlags = [
+    "-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools"
+  ]
+  # Conditional is required to prevent infinite recursion during a cross build
+  ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "-DQt6QmlTools_DIR=${pkgsBuildBuild.qt6.qtdeclarative}/lib/cmake/Qt6QmlTools"
   ];
 }