git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #25691 from ambrop72/kdevelop-shell

kdevelop: Fix shell integration (issue 25559)

commit0442676fd689548c97b9a6eda816a862ad75d2f7 authorThomas Tuegel <ttuegel@secure.mailbox.org> dateSat 13 May 2017, 11:24 (10 years ago) parentd88faa2549a9df
1 file changed+11−2
pkgs/applications/editors/kdevelop5/kdevelop.nix+11−2
pkgs/applications/editors/kdevelop5/kdevelop.nix+11−2
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, cmake, gettext, pkgconfig, extra-cmake-modules, makeQtWrapper
2−, qtquickcontrols, qtwebkit, qttools
2+, qtquickcontrols, qtwebkit, qttools, kde-cli-tools
33, kconfig, kdeclarative, kdoctools, kiconthemes, ki18n, kitemmodels, kitemviews
44, kjobwidgets, kcmutils, kio, knewstuff, knotifyconfig, kparts, ktexteditor
55, threadweaver, kxmlgui, kwindowsystem, grantlee
@@ -36,7 +36,16 @@ stdenv.mkDerivation rec {
3636
3737 postInstall = ''
3838 wrapQtProgram "$out/bin/kdevelop"
39− wrapProgram "$out/bin/kdevelop!" --prefix PATH ":" "${qttools}/bin"
39+
40+ # The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH.
41+ wrapProgram "$out/bin/kdevelop!" --prefix PATH ":" "${qttools}/bin:${kde-cli-tools}/bin"
42+
43+ # Fix the (now wrapped) kdevelop! to find things in right places:
44+ # - Make KDEV_BASEDIR point to bin directory of kdevplatform.
45+ kdev_fixup_sed="s|^export KDEV_BASEDIR=.*$|export KDEV_BASEDIR=${kdevplatform}/bin|"
46+ # - Fixup the one use where KDEV_BASEDIR is assumed to contain kdevelop.
47+ kdev_fixup_sed+=";s|\\\$KDEV_BASEDIR/kdevelop|$out/bin/kdevelop|"
48+ sed -E -i "$kdev_fixup_sed" "$out/bin/.kdevelop!-wrapped"
4049 '';
4150
4251 meta = with stdenv.lib; {