about summary refs log tree commit diff
path: root/pkgs/development/qtcreator
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-17 02:50:41 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-20 18:55:53 +0300
commita9662f8c4576e31b5f1294c6a7cb95f7b9944ca6 (patch)
treecd8222861d5f38b649675964b953b219c2bbda86 /pkgs/development/qtcreator
parentc161258003eee0d60618dd4bc39f543185f4517a (diff)
downloadnixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar.gz
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar.bz2
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar.lz
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar.xz
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.tar.zst
nixlib-a9662f8c4576e31b5f1294c6a7cb95f7b9944ca6.zip
qtcreator: move to qmakeHook
Diffstat (limited to 'pkgs/development/qtcreator')
-rw-r--r--pkgs/development/qtcreator/default.nix21
1 files changed, 6 insertions, 15 deletions
diff --git a/pkgs/development/qtcreator/default.nix b/pkgs/development/qtcreator/default.nix
index a5dde0a580b5..18e06cb81263 100644
--- a/pkgs/development/qtcreator/default.nix
+++ b/pkgs/development/qtcreator/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, makeWrapper
-, qtbase, qtquickcontrols, qtscript, qtdeclarative
+, qtbase, makeQtWrapper, qtquickcontrols, qtscript, qtdeclarative, qmakeHook
 , withDocumentation ? false
 }:
 
@@ -21,18 +21,15 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ makeWrapper qtbase qtscript qtquickcontrols qtdeclarative ];
 
+  nativeBuildInputs = [ qmakeHook makeQtWrapper ];
+
   doCheck = false;
 
   enableParallelBuilding = true;
 
-  preConfigure = ''
-    qmake -spec linux-g++ qtcreator.pro
-  '';
-
-  buildFlags = optionalString withDocumentation " docs";
+  buildFlags = optional withDocumentation "docs";
 
-  installFlags = "INSTALL_ROOT=$(out)"
-    + optionalString withDocumentation " install_docs";
+  installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
 
   postInstall = ''
     # Install desktop file
@@ -47,13 +44,7 @@ stdenv.mkDerivation rec {
     Type=Application
     Categories=Qt;Development;IDE;
     __EOF__
-    # Wrap the qtcreator binary
-    addToSearchPath QML2_IMPORT_PATH "${qtquickcontrols}/lib/qt5/qml"
-    addToSearchPath QML2_IMPORT_PATH "${qtdeclarative}/lib/qt5/qml"
-    wrapProgram $out/bin/qtcreator \
-      --prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
-      --prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
-      --prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH"
+    wrapQtProgram $out/bin/qtcreator
   '';
 
   meta = {