summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
blob: 76231f866efee38a6da60539ed7b11d6b4c91510 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ qtModule
, qtbase
, qtshadertools
, openssl
, python3
}:

qtModule {
  pname = "qtdeclarative";
  qtInputs = [ qtbase qtshadertools ];
  propagatedBuildInputs = [ openssl python3 ];
  preConfigure = ''
    export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
  '';
  cmakeFlags = [
    "-DQT6_INSTALL_PREFIX=${placeholder "out"}"
    "-DQT_INSTALL_PREFIX=${placeholder "out"}"
  ];
  patches = [
    # prevent headaches from stale qmlcache data
    ../patches/qtdeclarative-default-disable-qmlcache.patch
  ];
  postInstall = ''
    substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \
      --replace ''\'''${QT6_INSTALL_PREFIX}' "$dev"
  '';
  devTools = [
    "bin/qml"
    "bin/qmlcachegen"
    "bin/qmleasing"
    "bin/qmlimportscanner"
    "bin/qmllint"
    "bin/qmlmin"
    "bin/qmlplugindump"
    "bin/qmlprofiler"
    "bin/qmlscene"
    "bin/qmltestrunner"
  ];

  NIX_CFLAGS_COMPILE = [
    "-fmacro-prefix-map=${qtbase.dev}=qtbase.dev"
  ];
}