diff options
author | Artjom Vejsel <akawolf0@gmail.com> | 2015-08-24 07:50:17 +0300 |
---|---|---|
committer | Artjom Vejsel <akawolf0@gmail.com> | 2015-08-24 11:34:28 +0300 |
commit | 9c206b6cf7ab22aa20d8ed4ab7169b716c999762 (patch) | |
tree | 376d9fb337a1544656dab9c8dee6335d487a383c /pkgs/development/qtcreator | |
parent | e4410bfd8565ce317d31e4a670ba50ebbfec74df (diff) |
qtcreator: refactor for using qt54
Diffstat (limited to 'pkgs/development/qtcreator')
-rw-r--r-- | pkgs/development/qtcreator/default.nix | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/pkgs/development/qtcreator/default.nix b/pkgs/development/qtcreator/default.nix index 199df25d5523..0f55d4ee9af6 100644 --- a/pkgs/development/qtcreator/default.nix +++ b/pkgs/development/qtcreator/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtLib, sdkBuild ? false, withDocumentation ? true }: +{ stdenv, fetchurl, makeWrapper, qtLib, withDocumentation ? false }: with stdenv.lib; @@ -9,31 +9,21 @@ let in stdenv.mkDerivation rec { - # The package name depends on wether we are just building the QtCreator package or the whole Qt SDK - # If we are building the QtCreator package: qtcreator-version - # If we are building the QtSDK package, the Qt version is also included: qtsdk-version-qt-version - name = "qt${if sdkBuild then "sdk" else "creator"}-${version}" - + optionalString sdkBuild "-qt-${qtLib.version}"; + name = "qtcreator-${version}"; src = fetchurl { url = "http://download.qt-project.org/official_releases/qtcreator/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.gz"; sha256 = "1asbfphws0aqs92gjgh0iqzr1911kg51r9al44jxpfk88yazjzgm"; }; - # This property can be used in a nix development environment to refer to the Qt package - # eg: export QTDIR=${qtSDK.qt} - qt = qtLib; - - # We must only propagate Qt (including qmake) when building the QtSDK - propagatedBuildInputs = if sdkBuild then [ qtLib ] else []; - buildInputs = if sdkBuild == false then [ qtLib ] else []; + buildInputs = [ makeWrapper qtLib.base qtLib.script qtLib.quickcontrols qtLib.declarative ]; doCheck = false; enableParallelBuilding = true; preConfigure = '' - qmake -spec linux-g++ "QT_PRIVATE_HEADERS=${qtLib}/include" qtcreator.pro + qmake -spec linux-g++ qtcreator.pro ''; buildFlags = optionalString withDocumentation " docs"; @@ -54,6 +44,11 @@ stdenv.mkDerivation rec { Type=Application Categories=Qt;Development;IDE; __EOF__ + # Wrap the qtcreator binary + 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" ''; meta = { @@ -63,9 +58,9 @@ stdenv.mkDerivation rec { tailored to the needs of Qt developers. It includes features such as an advanced code editor, a visual debugger and a GUI designer. ''; - homepage = "http://qt-project.org/wiki/Category:Tools::QtCreator"; + homepage = "https://wiki.qt.io/Category:Tools::QtCreator"; license = "LGPL"; - maintainers = [ maintainers.bbenoist ]; + maintainers = [ maintainers.akaWolf maintainers.bbenoist ]; platforms = platforms.all; }; } |