about summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2017-05-26 15:44:07 -0500
committerThomas Tuegel <ttuegel@mailbox.org>2017-06-18 08:44:45 -0500
commit7f95d4834f772607fb4c9b2ffa4611ccd0a1006f (patch)
treefc475ca6cf20bd9f561659c639423012ac4b2806 /pkgs/desktops/plasma-5
parenta4be1a68f8d45d87e9dec36dc81070ed1f2b722e (diff)
downloadnixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar.gz
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar.bz2
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar.lz
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar.xz
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.tar.zst
nixlib-7f95d4834f772607fb4c9b2ffa4611ccd0a1006f.zip
kwin: pass path to Xwayland through preprocessor macro
Diffstat (limited to 'pkgs/desktops/plasma-5')
-rw-r--r--pkgs/desktops/plasma-5/kwin/default.nix7
-rw-r--r--pkgs/desktops/plasma-5/kwin/xwayland.patch2
2 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix
index ab8cc4d2498d..08f0e3468552 100644
--- a/pkgs/desktops/plasma-5/kwin/default.nix
+++ b/pkgs/desktops/plasma-5/kwin/default.nix
@@ -25,10 +25,9 @@ mkDerivation {
     udev wayland xcb-util-cursor xwayland
   ];
   patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
-  postPatch = ''
-    substituteInPlace main_wayland.cpp \
-        --subst-var-by xwayland ${lib.getBin xwayland}/bin/Xwayland
-  '';
+  NIX_CFLAGS_COMPILE = [
+    ''-DNIXPKGS_XWAYLAND="${lib.getBin xwayland}/bin/Xwayland"''
+  ];
   cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
   postInstall = ''
     # Some package(s) refer to these service types by the wrong name.
diff --git a/pkgs/desktops/plasma-5/kwin/xwayland.patch b/pkgs/desktops/plasma-5/kwin/xwayland.patch
index 5fde01d08bf3..51f15c87d274 100644
--- a/pkgs/desktops/plasma-5/kwin/xwayland.patch
+++ b/pkgs/desktops/plasma-5/kwin/xwayland.patch
@@ -7,7 +7,7 @@ Index: kwin-5.7.3/main_wayland.cpp
      m_xwaylandProcess = new Process(kwinApp());
      m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
 -    m_xwaylandProcess->setProgram(QStringLiteral("Xwayland"));
-+    m_xwaylandProcess->setProgram(QStringLiteral("@xwayland@"));
++    m_xwaylandProcess->setProgram(QLatin1String(NIXPKGS_XWAYLAND));
      QProcessEnvironment env = m_environment;
      env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
      m_xwaylandProcess->setProcessEnvironment(env);