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