From 49802ef50debea076b2bd2d644d66398faa3b6e0 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 14 Feb 2019 21:25:23 -0500 Subject: [PATCH] kdevelop: added ability to include kdevelop plugins kdev-php: init at 5.3.1 kdev-python: init at 5.3.1 --- .../editors/kdevelop5/kdev-php.nix | 29 ++++++++++++++++++ .../editors/kdevelop5/kdev-python.nix | 30 +++++++++++++++++++ .../editors/kdevelop5/kdevelop.nix | 7 +++++ .../editors/kdevelop5/wrapper.nix | 7 +++++ pkgs/top-level/all-packages.nix | 11 +++++-- 5 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/editors/kdevelop5/kdev-php.nix create mode 100644 pkgs/applications/editors/kdevelop5/kdev-python.nix create mode 100644 pkgs/applications/editors/kdevelop5/wrapper.nix diff --git a/pkgs/applications/editors/kdevelop5/kdev-php.nix b/pkgs/applications/editors/kdevelop5/kdev-php.nix new file mode 100644 index 000000000000..532bb99e7d8e --- /dev/null +++ b/pkgs/applications/editors/kdevelop5/kdev-php.nix @@ -0,0 +1,29 @@ +{ stdenv, lib, fetchurl, cmake, extra-cmake-modules, threadweaver, ktexteditor, kdevelop-unwrapped, kdevelop-pg-qt }: + +let + pname = "kdev-php"; + version = "5.3.1"; +in +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz"; + sha256 = "1xiz4v6w30dsa7l4nk3jw3hxpkx71b0yaaj2k8s7xzgjif824bgl"; + }; + + cmakeFlags = [ + "-DBUILD_TESTING=OFF" + ]; + + nativeBuildInputs = [ cmake extra-cmake-modules ]; + buildInputs = [ kdevelop-pg-qt threadweaver ktexteditor kdevelop-unwrapped ]; + + meta = with lib; { + maintainers = [ maintainers.aanderse ]; + platforms = platforms.linux; + description = "PHP support for KDevelop"; + homepage = https://www.kdevelop.org; + license = [ licenses.gpl2 ]; + }; +} diff --git a/pkgs/applications/editors/kdevelop5/kdev-python.nix b/pkgs/applications/editors/kdevelop5/kdev-python.nix new file mode 100644 index 000000000000..be27e10f42a1 --- /dev/null +++ b/pkgs/applications/editors/kdevelop5/kdev-python.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchurl, cmake, extra-cmake-modules, threadweaver, ktexteditor, kdevelop-unwrapped, python }: + +let + pname = "kdev-python"; + version = "5.3.1"; +in +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz"; + sha256 = "11hf8n6vrlaz31c0p3xbnf0df2q5j6ykgc9ip0l5g33kadwn5b9j"; + }; + + cmakeFlags = [ + "-DBUILD_TESTING=OFF" + "-DPYTHON_EXECUTABLE=${python}/bin/python" + ]; + + nativeBuildInputs = [ cmake extra-cmake-modules ]; + buildInputs = [ threadweaver ktexteditor kdevelop-unwrapped ]; + + meta = with lib; { + maintainers = [ maintainers.aanderse ]; + platforms = platforms.linux; + description = "Python support for KDevelop"; + homepage = https://www.kdevelop.org; + license = [ licenses.gpl2 ]; + }; +} diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix index a35bd14f310c..98154b4a5eb5 100644 --- a/pkgs/applications/editors/kdevelop5/kdevelop.nix +++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix @@ -43,6 +43,13 @@ mkDerivation rec { "-DCLANG_BUILTIN_DIR=${llvmPackages.clang-unwrapped}/lib/clang/${(builtins.parseDrvName llvmPackages.clang.name).version}/include" ]; + postPatch = '' + # FIXME: temporary until https://invent.kde.org/kde/kdevelop/merge_requests/8 is merged + substituteInPlace kdevplatform/language/backgroundparser/parsejob.cpp --replace \ + 'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev"))) {' \ + 'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev")) || localFile.startsWith(path + QStringLiteral("/kdev"))) {' + ''; + postInstall = '' # The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH. wrapProgram "$out/bin/kdevelop!" \ diff --git a/pkgs/applications/editors/kdevelop5/wrapper.nix b/pkgs/applications/editors/kdevelop5/wrapper.nix new file mode 100644 index 000000000000..86d3de9eb39a --- /dev/null +++ b/pkgs/applications/editors/kdevelop5/wrapper.nix @@ -0,0 +1,7 @@ +{ symlinkJoin, kdevelop-unwrapped, plugins ? null }: + +symlinkJoin { + name = "kdevelop-with-plugins"; + + paths = [ kdevelop-unwrapped ] ++ (if plugins != null then plugins else []); +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ee950c438775..d996ecd97c3e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17879,12 +17879,19 @@ in inherit (kdeFrameworks) kdesu; - kdevelop-pg-qt = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop-pg-qt.nix {}; + kdevelop-pg-qt = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop-pg-qt.nix { }; - kdevelop = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop.nix { + kdevelop-unwrapped = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop.nix { llvmPackages = llvmPackages_7; }; + kdev-php = libsForQt5.callPackage ../applications/editors/kdevelop5/kdev-php.nix { }; + kdev-python = libsForQt5.callPackage ../applications/editors/kdevelop5/kdev-python.nix { + python = python3; + }; + + kdevelop = libsForQt5.callPackage ../applications/editors/kdevelop5/wrapper.nix { }; + keepnote = callPackage ../applications/office/keepnote { }; kega-fusion = pkgsi686Linux.callPackage ../misc/emulators/kega-fusion { };