about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2019-02-14 21:25:23 -0500
committerAaron Andersen <aaron@fosslib.net>2019-02-15 23:20:43 -0500
commit49802ef50debea076b2bd2d644d66398faa3b6e0 (patch)
tree64377df74fdb68525ccb19c9ac7c70bbe536ef9b /pkgs/applications/editors
parent01d8894c4d0f7fdd4f3534e6268b8e4c503d7258 (diff)
downloadnixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar.gz
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar.bz2
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar.lz
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar.xz
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.tar.zst
nixlib-49802ef50debea076b2bd2d644d66398faa3b6e0.zip
kdevelop: added ability to include kdevelop plugins
kdev-php: init at 5.3.1
kdev-python: init at 5.3.1
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/kdevelop5/kdev-php.nix29
-rw-r--r--pkgs/applications/editors/kdevelop5/kdev-python.nix30
-rw-r--r--pkgs/applications/editors/kdevelop5/kdevelop.nix7
-rw-r--r--pkgs/applications/editors/kdevelop5/wrapper.nix7
4 files changed, 73 insertions, 0 deletions
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 []);
+}