about summary refs log tree commit diff
path: root/pkgs/kde
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-06-12 14:03:11 +0300
committerK900 <me@0upti.me>2024-06-12 14:03:11 +0300
commit0ff2232bdbcae37df8d4740dfd026e943ee65d8b (patch)
treec82a5ca3c0be4f1022f3d3acae95060afa6e560d /pkgs/kde
parent2279c02ec55ee750f3e795ecff50e0fbea5eb706 (diff)
downloadnixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar.gz
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar.bz2
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar.lz
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar.xz
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.tar.zst
nixlib-0ff2232bdbcae37df8d4740dfd026e943ee65d8b.zip
kdePackages.kio: resolve full paths to executables from the caller
We can't rely on systemd here because it doesn't have PATH.
Diffstat (limited to 'pkgs/kde')
-rw-r--r--pkgs/kde/frameworks/kio/default.nix4
-rw-r--r--pkgs/kde/frameworks/kio/early-resolve-executables.diff13
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/kde/frameworks/kio/default.nix b/pkgs/kde/frameworks/kio/default.nix
index 03c2da9e0f5a..6d5ba811a518 100644
--- a/pkgs/kde/frameworks/kio/default.nix
+++ b/pkgs/kde/frameworks/kio/default.nix
@@ -10,8 +10,10 @@ mkKdeDerivation {
 
   patches = [
     # Remove hardcoded smbd search path
-    # FIXME(later): discuss with upstream?
     ./0001-Remove-impure-smbd-search-path.patch
+    # When running a process through systemd, resolve the full path ourselves
+    ./early-resolve-executables.diff
+    # FIXME(later): discuss with upstream?
   ];
 
   extraBuildInputs = [qt5compat qttools acl attr];
diff --git a/pkgs/kde/frameworks/kio/early-resolve-executables.diff b/pkgs/kde/frameworks/kio/early-resolve-executables.diff
new file mode 100644
index 000000000000..d11a6a0dbeee
--- /dev/null
+++ b/pkgs/kde/frameworks/kio/early-resolve-executables.diff
@@ -0,0 +1,13 @@
+diff --git a/src/gui/systemd/systemdprocessrunner.cpp b/src/gui/systemd/systemdprocessrunner.cpp
+index afe3e2c69..5e5ee012d 100644
+--- a/src/gui/systemd/systemdprocessrunner.cpp
++++ b/src/gui/systemd/systemdprocessrunner.cpp
+@@ -128,7 +128,7 @@ void SystemdProcessRunner::startProcess()
+                                               // so we can be notified (see https://github.com/systemd/systemd/pull/3984)
+             {QStringLiteral("Environment"), m_process->environment()},
+             {QStringLiteral("WorkingDirectory"), m_process->workingDirectory()},
+-            {QStringLiteral("ExecStart"), QVariant::fromValue(ExecCommandList{{m_process->program().first(), m_process->program(), false}})},
++            {QStringLiteral("ExecStart"), QVariant::fromValue(ExecCommandList{{QStandardPaths::findExecutable(m_process->program().first()), m_process->program(), false}})},
+         },
+         {} // aux is currently unused and should be passed as empty array.
+     );