kwin: pass path to Xwayland through preprocessor macro

This commit is contained in:
Thomas Tuegel 2017-05-26 15:44:07 -05:00
parent a4be1a68f8
commit 7f95d4834f
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
2 changed files with 4 additions and 5 deletions

View file

@ -25,10 +25,9 @@ mkDerivation {
udev wayland xcb-util-cursor xwayland udev wayland xcb-util-cursor xwayland
]; ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
postPatch = '' NIX_CFLAGS_COMPILE = [
substituteInPlace main_wayland.cpp \ ''-DNIXPKGS_XWAYLAND="${lib.getBin xwayland}/bin/Xwayland"''
--subst-var-by xwayland ${lib.getBin xwayland}/bin/Xwayland ];
'';
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
postInstall = '' postInstall = ''
# Some package(s) refer to these service types by the wrong name. # Some package(s) refer to these service types by the wrong name.

View file

@ -7,7 +7,7 @@ Index: kwin-5.7.3/main_wayland.cpp
m_xwaylandProcess = new Process(kwinApp()); m_xwaylandProcess = new Process(kwinApp());
m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
- m_xwaylandProcess->setProgram(QStringLiteral("Xwayland")); - m_xwaylandProcess->setProgram(QStringLiteral("Xwayland"));
+ m_xwaylandProcess->setProgram(QStringLiteral("@xwayland@")); + m_xwaylandProcess->setProgram(QLatin1String(NIXPKGS_XWAYLAND));
QProcessEnvironment env = m_environment; QProcessEnvironment env = m_environment;
env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd)); env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
m_xwaylandProcess->setProcessEnvironment(env); m_xwaylandProcess->setProcessEnvironment(env);