nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 qtModule,
3 qtbase,
4 qtlanguageserver,
5 qtshadertools,
6 qtsvg,
7 openssl,
8 darwin,
9 stdenv,
10 lib,
11 pkgsBuildBuild,
12 replaceVars,
13 fetchpatch,
14}:
15
16qtModule {
17 pname = "qtdeclarative";
18
19 propagatedBuildInputs = [
20 qtbase
21 qtlanguageserver
22 qtshadertools
23 qtsvg
24 openssl
25 ];
26 strictDeps = true;
27
28 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
29 darwin.sigtool
30 ];
31
32 patches = [
33 # don't cache bytecode of bare qml files in the store, as that never gets cleaned up
34 (replaceVars ./dont-cache-nix-store-paths.patch {
35 nixStore = builtins.storeDir;
36 })
37 # add version specific QML import path
38 ./use-versioned-import-path.patch
39
40 # fix common Plasma crasher
41 # FIXME: remove in 6.10.2
42 (fetchpatch {
43 url = "https://github.com/qt/qtdeclarative/commit/9c6b2b78e9076f1c2676aa0c41573db9ca480654.diff";
44 hash = "sha256-KMFurA9Q84qwuyBraU3ZdoFWs8uO3uoUcinfcfh/ps8=";
45 })
46
47 # Backport of https://codereview.qt-project.org/c/qt/qtdeclarative/+/704031
48 # Fixes common Plasma crash
49 # FIXME: remove in 6.10.3
50 ./another-crash-fix.patch
51
52 # https://qt-project.atlassian.net/browse/QTBUG-137440
53 (fetchpatch {
54 name = "rb-dialogs-link-labsfolderlistmodel-into-quickdialogs2quickimpl.patch";
55 url = "https://github.com/qt/qtdeclarative/commit/4047fa8c6017d8e214e6ec3ddbed622fd34058e4.patch";
56 hash = "sha256-0a7a1AI8N35rqLY4M3aSruXXPBqz9hX2yT65r/xzfhc=";
57 })
58 (fetchpatch {
59 name = "rb-quickcontrols-fix-controls-styles-linkage.patch";
60 url = "https://github.com/qt/qtdeclarative/commit/aa805ed54d55479360e0e95964dcc09a858aeb28.patch";
61 hash = "sha256-EDdsXRokHPQ5jflaVucOZP3WSopMjrAM39WZD1Hk/5I=";
62 })
63 ];
64
65 cmakeFlags = [
66 "-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools"
67 # for some reason doesn't get found automatically on Darwin
68 "-DPython_EXECUTABLE=${lib.getExe pkgsBuildBuild.python3}"
69 ]
70 # Conditional is required to prevent infinite recursion during a cross build
71 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
72 "-DQt6QmlTools_DIR=${pkgsBuildBuild.qt6.qtdeclarative}/lib/cmake/Qt6QmlTools"
73 ];
74
75 meta.maintainers = with lib.maintainers; [
76 nickcao
77 outfoxxed
78 ];
79}