about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2019-02-19 21:47:25 +0000
committerGitHub <noreply@github.com>2019-02-19 21:47:25 +0000
commit160abfe3ec472cc3e7cdf032aa71f4cdbd075cce (patch)
tree58cc0f5c8b715449b70580d4bbd82bc5a9cdc03e /pkgs/applications/editors
parente0a927556b9655c7feaa73af8b10f01751a24060 (diff)
parent49802ef50debea076b2bd2d644d66398faa3b6e0 (diff)
downloadnixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar.gz
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar.bz2
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar.lz
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar.xz
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.tar.zst
nixlib-160abfe3ec472cc3e7cdf032aa71f4cdbd075cce.zip
Merge pull request #55872 from aanderse/kdevelop-php
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 []);
+}