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