lol
1{ stdenv, fetchurl, makeWrapper
2, qtbase, qtquickcontrols, qtscript, qtdeclarative, qmake
3, withDocumentation ? false
4}:
5
6with stdenv.lib;
7
8let
9 baseVersion = "4.5";
10 revision = "0";
11in
12
13stdenv.mkDerivation rec {
14 name = "qtcreator-${version}";
15 version = "${baseVersion}.${revision}";
16
17 src = fetchurl {
18 url = "http://download.qt-project.org/official_releases/qtcreator/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.xz";
19 sha256 = "1yfrfma23xxzz8hl43g7pk7ay5lg25l9lscjlih617lyv6jmc0hl";
20 };
21
22 buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative ];
23
24 nativeBuildInputs = [ qmake makeWrapper ];
25
26 doCheck = true;
27
28 enableParallelBuilding = true;
29
30 buildFlags = optional withDocumentation "docs";
31
32 installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
33
34 preConfigure = ''
35 substituteInPlace src/plugins/plugins.pro \
36 --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
37 '';
38
39 preBuild = optional withDocumentation ''
40 ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
41 '';
42
43 postInstall = ''
44 substituteInPlace $out/share/applications/org.qt-project.qtcreator.desktop \
45 --replace "Exec=qtcreator" "Exec=$out/bin/qtcreator"
46 '';
47
48 meta = {
49 description = "Cross-platform IDE tailored to the needs of Qt developers";
50 longDescription = ''
51 Qt Creator is a cross-platform IDE (integrated development environment)
52 tailored to the needs of Qt developers. It includes features such as an
53 advanced code editor, a visual debugger and a GUI designer.
54 '';
55 homepage = https://wiki.qt.io/Category:Tools::QtCreator;
56 license = "LGPL";
57 maintainers = [ maintainers.akaWolf ];
58 platforms = [ "i686-linux" "x86_64-linux" ];
59 };
60}