plasma-desktop: pass path to hwclock through preprocessor macro

This commit is contained in:
Thomas Tuegel 2017-05-26 15:43:31 -05:00
parent 86dac81a70
commit a4be1a68f8
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
2 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,10 @@ mkDerivation rec {
sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
'';
NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
NIX_CFLAGS_COMPILE = [
"-I${lib.getDev xorgserver}/include/xorg"
''-DNIXPKGS_HWCLOCK="${lib.getBin utillinux}/sbin/hwclock"''
];
cmakeFlags = [
"-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg"
"-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics.dev}/include/xorg"

View File

@ -18,7 +18,7 @@ Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
void ClockHelper::toHwclock()
{
- QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath);
+ QString hwclock = "@hwclock@";
+ QString hwclock = QLatin1String(NIXPKGS_HWCLOCK);
if (!hwclock.isEmpty()) {
KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
}