aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch
blob: a46212af10fbfa40450786ce4f9c2c590e5a15e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
===================================================================
--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
+++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
@@ -48,10 +48,6 @@
 #include <sys/stat.h>
 #endif
 
-// We cannot rely on the $PATH environment variable, because D-Bus activation
-// clears it. So we have to use a reasonable default.
-static const QString exePath = QStringLiteral("/usr/sbin:/usr/bin:/sbin:/bin");
-
 int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled )
 {
     int ret = 0;
@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
 
 void ClockHelper::toHwclock()
 {
-    QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath);
+    QString hwclock = QLatin1String(NIXPKGS_HWCLOCK);
     if (!hwclock.isEmpty()) {
         KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
     }