forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / qt-6 / modules / qtdeclarative.nix
blob42f5bfd76b88b6cb6b8b8e32a09ec918d2c5fd5e
1 { qtModule
2 , qtbase
3 , qtlanguageserver
4 , qtshadertools
5 , openssl
6 , stdenv
7 , lib
8 , pkgsBuildBuild
9 , fetchpatch2
12 qtModule {
13   pname = "qtdeclarative";
15   propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl ];
16   strictDeps = true;
18   patches = [
19     # prevent headaches from stale qmlcache data
20     ../patches/0001-qtdeclarative-disable-qml-disk-cache.patch
21     # add version specific QML import path
22     ../patches/0002-qtdeclarative-also-use-versioned-qml-paths.patch
24     # Backport patches for https://bugs.kde.org/show_bug.cgi?id=493116
25     # FIXME: remove for 6.8.1
26     (fetchpatch2 {
27       url = "https://github.com/qt/qtdeclarative/commit/3330731d0cb221477ab3d856db032126403ae6a0.patch";
28       hash = "sha256-XXXGJ7nVDpEG/6nr16L89J87tvutyc+YnQPQx9cRU+w=";
29     })
30     (fetchpatch2 {
31       url = "https://github.com/qt/qtdeclarative/commit/2aefbca84d2f3dca2c2697f13710b6907c0c7e59.patch";
32       hash = "sha256-a/BX0gpW6juJbjDRo8OleMahOC6WWqreURmYZNiGm5c=";
33     })
34     # Backport patch to fix Kirigami applications crashing
35     # FIXME: remove for 6.8.1
36     (fetchpatch2 {
37       url = "https://github.com/qt/qtdeclarative/commit/0ae3697cf40bcd3ae1de20621abad17cf6c5f52d.patch";
38       hash = "sha256-YuTHqHCWOsqUOATfaAZRxPSwMsFNylxoqnqCeW5kPjs=";
39     })
40   ];
42   cmakeFlags = [
43     "-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools"
44     # for some reason doesn't get found automatically on Darwin
45     "-DPython_EXECUTABLE=${lib.getExe pkgsBuildBuild.python3}"
46   ]
47   # Conditional is required to prevent infinite recursion during a cross build
48   ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
49     "-DQt6QmlTools_DIR=${pkgsBuildBuild.qt6.qtdeclarative}/lib/cmake/Qt6QmlTools"
50   ];