1
2{ mkDerivation, lib, fetchurl, cmake, gettext, pkg-config, extra-cmake-modules
3, qtquickcontrols, qtwebkit, qttools, kde-cli-tools, qtbase
4, kconfig, kdeclarative, kdoctools, kiconthemes, ki18n, kitemmodels, kitemviews
5, kjobwidgets, kcmutils, kio, knewstuff, knotifyconfig, kparts, ktexteditor
6, threadweaver, kxmlgui, kwindowsystem, grantlee, kcrash, karchive, kguiaddons
7, plasma-framework, krunner, kdevelop-pg-qt, shared-mime-info, libkomparediff2
8, libksysguard, konsole, llvmPackages, makeWrapper, kpurpose, boost
9}:
10
11mkDerivation rec {
12 pname = "kdevelop";
13 version = "5.6.2";
14
15 src = fetchurl {
16 url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
17 sha256 = "sha256-D4a8P+U/dhwePj91RFd6DEFDO+i/8xDPLnKfdvQ2O/Y=";
18 };
19
20 nativeBuildInputs = [
21 cmake gettext pkg-config extra-cmake-modules makeWrapper
22 ];
23
24 buildInputs = [
25 kdevelop-pg-qt
26 llvmPackages.llvm llvmPackages.libclang
27 ];
28
29 propagatedBuildInputs = [
30 qtquickcontrols qtwebkit boost libkomparediff2
31 kconfig kdeclarative kdoctools kiconthemes ki18n kitemmodels kitemviews
32 kjobwidgets kcmutils kio knewstuff knotifyconfig kparts ktexteditor
33 threadweaver kxmlgui kwindowsystem grantlee plasma-framework krunner
34 shared-mime-info libksysguard konsole kcrash karchive kguiaddons kpurpose
35 ];
36
37 # https://cgit.kde.org/kdevelop.git/commit/?id=716372ae2e8dff9c51e94d33443536786e4bd85b
38 # required as nixos seems to be unable to find CLANG_BUILTIN_DIR
39 cmakeFlags = [
40 "-DCLANG_BUILTIN_DIR=${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
41 ];
42
43 dontWrapQtApps = true;
44
45 postInstall = ''
46 # The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH.
47 wrapProgram "$out/bin/kdevelop!" \
48 --prefix PATH ":" "${lib.makeBinPath [ qttools kde-cli-tools ]}"
49
50 wrapQtApp "$out/bin/kdevelop"
51
52 # Fix the (now wrapped) kdevelop! to find things in right places:
53 # - Fixup the one use where KDEV_BASEDIR is assumed to contain kdevelop.
54 kdev_fixup_sed+=";s|\\\$KDEV_BASEDIR/kdevelop|$out/bin/kdevelop|"
55 sed -E -i "$kdev_fixup_sed" "$out/bin/.kdevelop!-wrapped"
56 '';
57
58 meta = with lib; {
59 maintainers = [ maintainers.ambrop72 ];
60 platforms = platforms.linux;
61 description = "KDE official IDE";
62 longDescription =
63 ''
64 A free, opensource IDE (Integrated Development Environment)
65 for MS Windows, Mac OsX, Linux, Solaris and FreeBSD. It is a
66 feature-full, plugin extendable IDE for C/C++ and other
67 programing languages. It is based on KDevPlatform, KDE and Qt
68 libraries and is under development since 1998.
69 '';
70 homepage = "https://www.kdevelop.org";
71 license = with licenses; [ gpl2Plus lgpl2Plus ];
72 };
73}