Commit 508a0a89 authored by K900's avatar K900
Browse files

kdePackages.kde-gtk-config: hardcode more dependency paths

parent 4b596e92
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
{
  lib,
  mkKdeDerivation,
  substituteAll,
  procps,
  xsettingsd,
  pkg-config,
  wrapGAppsHook3,
  sass,
@@ -11,7 +15,17 @@ mkKdeDerivation {

  # The gtkconfig KDED module will crash the daemon if the GSettings schemas
  # aren't found.
  patches = [./0001-gsettings-schemas-path.patch];
  patches = [
    ./0001-gsettings-schemas-path.patch
    (
      substituteAll {
        src = ./dependency-paths.patch;
        pgrep = lib.getExe' procps "pgrep";
        xsettingsd = lib.getExe xsettingsd;
      }
    )
  ];

  preConfigure = ''
    NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\""
  '';
@@ -21,4 +35,10 @@ mkKdeDerivation {
  dontWrapGApps = true; # There is nothing to wrap

  extraCmakeFlags = ["-DGLIB_SCHEMAS_DIR=${gsettings-desktop-schemas.out}/"];

  # Hardcoded as QStrings, which are UTF-16 so Nix can't pick these up automatically
  postFixup = ''
    mkdir -p $out/nix-support
    echo "${procps} ${xsettingsd}" > $out/nix-support/depends
  '';
}
+22 −0
Original line number Diff line number Diff line
diff --git a/kded/config_editor/xsettings.cpp b/kded/config_editor/xsettings.cpp
index 1f9fe5b..9824973 100644
--- a/kded/config_editor/xsettings.cpp
+++ b/kded/config_editor/xsettings.cpp
@@ -46,7 +46,7 @@ void replaceValueInXSettingsdContents(QString &xSettingsdContents, const QString
 pid_t pidOfXSettingsd()
 {
     QProcess pgrep;
-    pgrep.start(QStringLiteral("pgrep"),
+    pgrep.start(QStringLiteral("@pgrep@"),
                 QStringList{
                     QStringLiteral("-u"),
                     QString::number(getuid()),
@@ -67,7 +67,7 @@ reloadXSettingsd(void *)
 {
     pid_t xSettingsdPid = pidOfXSettingsd();
     if (xSettingsdPid == 0) {
-        QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("xsettingsd")), QStringList());
+        QProcess::startDetached(QStringLiteral("@xsettingsd@"), QStringList());
     } else {
         kill(xSettingsdPid, SIGHUP);
     }