about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/plasma-5/kwin
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/desktops/plasma-5/kwin
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/desktops/plasma-5/kwin')
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/kwin/default.nix46
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch13
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch24
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/kwin/series3
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/kwin/xwayland.patch13
5 files changed, 99 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/default.nix b/nixpkgs/pkgs/desktops/plasma-5/kwin/default.nix
new file mode 100644
index 000000000000..b8f381e97149
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/default.nix
@@ -0,0 +1,46 @@
+{
+  mkDerivation, lib, copyPathsToStore,
+  extra-cmake-modules, kdoctools,
+
+  epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor,
+  xwayland,
+
+  qtdeclarative, qtmultimedia, qtscript, qtx11extras,
+
+  breeze-qt5, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets,
+  kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, ki18n,
+  kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, kpackage,
+  kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem, kxmlgui,
+  plasma-framework, qtsensors, libcap, libdrm
+}:
+
+mkDerivation {
+  name = "kwin";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    epoxy libICE libSM libinput libxkbcommon udev wayland xcb-util-cursor
+    xwayland
+
+    qtdeclarative qtmultimedia qtscript qtx11extras qtsensors
+
+    breeze-qt5 kactivities kcmutils kcompletion kconfig kconfigwidgets
+    kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes
+    kidletime kinit kio knewstuff knotifications kpackage kscreenlocker kservice
+    kwayland kwidgetsaddons kwindowsystem kxmlgui plasma-framework
+    libcap libdrm
+  ];
+  outputs = [ "bin" "dev" "out" ];
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+  CXXFLAGS = [
+    ''-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.
+    # I would prefer to patch those packages, but I cannot find them!
+    ln -s ''${!outputBin}/share/kservicetypes5/kwineffect.desktop \
+          ''${!outputBin}/share/kservicetypes5/kwin-effect.desktop
+    ln -s ''${!outputBin}/share/kservicetypes5/kwinscript.desktop \
+          ''${!outputBin}/share/kservicetypes5/kwin-script.desktop
+  '';
+}
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch b/nixpkgs/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch
new file mode 100644
index 000000000000..60b8f5ef541f
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch
@@ -0,0 +1,13 @@
+Index: kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp
+===================================================================
+--- kwin-5.7.3.orig/plugins/kdecorations/aurorae/src/aurorae.cpp
++++ kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp
+@@ -211,7 +211,7 @@ void Helper::init()
+     // so let's try to locate our plugin:
+     QString pluginPath;
+     for (const QString &path : m_engine->importPathList()) {
+-        QDirIterator it(path, QDirIterator::Subdirectories);
++        QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+         while (it.hasNext()) {
+             it.next();
+             QFileInfo fileInfo = it.fileInfo();
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch b/nixpkgs/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch
new file mode 100644
index 000000000000..80aacacc6ca0
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch
@@ -0,0 +1,24 @@
+Dont set capabilities on kwin_wayland executable at build time
+
+This is handled by security.wrappers on NixOS
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48cbcdbfe..93b410ed8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -674,15 +674,6 @@ if (HAVE_LIBCAP)
+ endif()
+
+ install(TARGETS kwin_wayland         ${INSTALL_TARGETS_DEFAULT_ARGS} )
+-if (HAVE_LIBCAP)
+-    install(
+-    CODE "execute_process(
+-            COMMAND
+-                ${SETCAP_EXECUTABLE}
+-                CAP_SYS_NICE=+ep
+-                \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/kwin_wayland)"
+-    )
+-endif()
+
+ add_subdirectory(platformsupport)
+ add_subdirectory(plugins)
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/series b/nixpkgs/pkgs/desktops/plasma-5/kwin/series
new file mode 100644
index 000000000000..8efb74eabd67
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/series
@@ -0,0 +1,3 @@
+follow-symlinks.patch
+xwayland.patch
+no-setcap-install.patch
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/xwayland.patch b/nixpkgs/pkgs/desktops/plasma-5/kwin/xwayland.patch
new file mode 100644
index 000000000000..51f15c87d274
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/xwayland.patch
@@ -0,0 +1,13 @@
+Index: kwin-5.7.3/main_wayland.cpp
+===================================================================
+--- kwin-5.7.3.orig/main_wayland.cpp
++++ kwin-5.7.3/main_wayland.cpp
+@@ -315,7 +315,7 @@ void ApplicationWayland::startXwaylandSe
+ 
+     m_xwaylandProcess = new Process(kwinApp());
+     m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
+-    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);