summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/kdevelop5
diff options
context:
space:
mode:
authorAmbroz Bizjak <ambrop7@gmail.com>2017-05-11 00:01:20 +0200
committerAmbroz Bizjak <ambrop7@gmail.com>2017-05-11 00:03:17 +0200
commit549a9df9aa3e124da112a3f1fb54f357a5cf0eed (patch)
tree84061c0f95a6d501bb22a0410ef56827e3503199 /pkgs/applications/editors/kdevelop5
parent42bf19cc04da8c8ba917ec865d9780a75fff9a8a (diff)
kdevelop: Fix shell integration (issue 25559)
Diffstat (limited to 'pkgs/applications/editors/kdevelop5')
-rw-r--r--pkgs/applications/editors/kdevelop5/kdevelop.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix
index facd1206a00e..9191d7a66537 100644
--- a/pkgs/applications/editors/kdevelop5/kdevelop.nix
+++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, cmake, gettext, pkgconfig, extra-cmake-modules, makeQtWrapper
-, qtquickcontrols, qtwebkit, qttools
+, qtquickcontrols, qtwebkit, qttools, kde-cli-tools
, kconfig, kdeclarative, kdoctools, kiconthemes, ki18n, kitemmodels, kitemviews
, kjobwidgets, kcmutils, kio, knewstuff, knotifyconfig, kparts, ktexteditor
, threadweaver, kxmlgui, kwindowsystem, grantlee
@@ -36,7 +36,16 @@ stdenv.mkDerivation rec {
postInstall = ''
wrapQtProgram "$out/bin/kdevelop"
- wrapProgram "$out/bin/kdevelop!" --prefix PATH ":" "${qttools}/bin"
+
+ # The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH.
+ wrapProgram "$out/bin/kdevelop!" --prefix PATH ":" "${qttools}/bin:${kde-cli-tools}/bin"
+
+ # Fix the (now wrapped) kdevelop! to find things in right places:
+ # - Make KDEV_BASEDIR point to bin directory of kdevplatform.
+ kdev_fixup_sed="s|^export KDEV_BASEDIR=.*$|export KDEV_BASEDIR=${kdevplatform}/bin|"
+ # - Fixup the one use where KDEV_BASEDIR is assumed to contain kdevelop.
+ kdev_fixup_sed+=";s|\\\$KDEV_BASEDIR/kdevelop|$out/bin/kdevelop|"
+ sed -E -i "$kdev_fixup_sed" "$out/bin/.kdevelop!-wrapped"
'';
meta = with stdenv.lib; {