qtcreator: refactor for using qt54
This commit is contained in:
parent
e4410bfd85
commit
9c206b6cf7
|
@ -14,6 +14,7 @@
|
||||||
aflatter = "Alexander Flatter <flatter@fastmail.fm>";
|
aflatter = "Alexander Flatter <flatter@fastmail.fm>";
|
||||||
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
||||||
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
||||||
|
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
|
||||||
akc = "Anders Claesson <akc@akc.is>";
|
akc = "Anders Claesson <akc@akc.is>";
|
||||||
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
|
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
|
||||||
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, qtLib, sdkBuild ? false, withDocumentation ? true }:
|
{ stdenv, fetchurl, makeWrapper, qtLib, withDocumentation ? false }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
|
@ -9,31 +9,21 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
# The package name depends on wether we are just building the QtCreator package or the whole Qt SDK
|
name = "qtcreator-${version}";
|
||||||
# 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}";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.qt-project.org/official_releases/qtcreator/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.gz";
|
url = "http://download.qt-project.org/official_releases/qtcreator/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.gz";
|
||||||
sha256 = "1asbfphws0aqs92gjgh0iqzr1911kg51r9al44jxpfk88yazjzgm";
|
sha256 = "1asbfphws0aqs92gjgh0iqzr1911kg51r9al44jxpfk88yazjzgm";
|
||||||
};
|
};
|
||||||
|
|
||||||
# This property can be used in a nix development environment to refer to the Qt package
|
buildInputs = [ makeWrapper qtLib.base qtLib.script qtLib.quickcontrols qtLib.declarative ];
|
||||||
# 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 [];
|
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
qmake -spec linux-g++ "QT_PRIVATE_HEADERS=${qtLib}/include" qtcreator.pro
|
qmake -spec linux-g++ qtcreator.pro
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildFlags = optionalString withDocumentation " docs";
|
buildFlags = optionalString withDocumentation " docs";
|
||||||
|
@ -54,6 +44,11 @@ stdenv.mkDerivation rec {
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Qt;Development;IDE;
|
Categories=Qt;Development;IDE;
|
||||||
__EOF__
|
__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 = {
|
meta = {
|
||||||
|
@ -63,9 +58,9 @@ stdenv.mkDerivation rec {
|
||||||
tailored to the needs of Qt developers. It includes features such as an
|
tailored to the needs of Qt developers. It includes features such as an
|
||||||
advanced code editor, a visual debugger and a GUI designer.
|
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";
|
license = "LGPL";
|
||||||
maintainers = [ maintainers.bbenoist ];
|
maintainers = [ maintainers.akaWolf maintainers.bbenoist ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7968,7 +7968,7 @@ let
|
||||||
});
|
});
|
||||||
|
|
||||||
qtcreator = callPackage ../development/qtcreator {
|
qtcreator = callPackage ../development/qtcreator {
|
||||||
qtLib = qt5Full; # 3.4 only supports qt5; TODO: use modularized qt>=5.4
|
qtLib = qt54;
|
||||||
withDocumentation = true;
|
withDocumentation = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue