about summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
blob: 3e2136f39bcd9a1f571624457f34d37c5b5c9cf0 (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
{ lib
, stdenv
, qtModule, python3, qtbase, qtsvg }:

qtModule {
  pname = "qtdeclarative";
  propagatedBuildInputs = [ qtbase qtsvg ];
  nativeBuildInputs = [ python3 ];
  outputs = [ "out" "dev" "bin" ];
  preConfigure = ''
    NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""
  '';
  configureFlags = [ "-qml-debug" ];
  devTools = [
    "bin/qml"
    "bin/qmlcachegen"
    "bin/qmleasing"
    "bin/qmlimportscanner"
    "bin/qmllint"
    "bin/qmlmin"
    "bin/qmlplugindump"
    "bin/qmlprofiler"
    "bin/qmlscene"
    "bin/qmltestrunner"
  ];
  postFixup = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
    mv $dev/bin/qmlformat $bin/bin/qmlformat
    mv $dev/bin/qmltyperegistrar $bin/bin/qmltyperegistrar
    ln -s $bin/bin/qmlformat $dev/bin/qmlformat
    ln -s $bin/bin/qmltyperegistrar $dev/bin/qmltyperegistrar
  '';
}