diff options
Diffstat (limited to 'nixpkgs/pkgs/desktops/plasma-5/kwin')
5 files changed, 184 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch b/nixpkgs/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch new file mode 100644 index 000000000000..4861df46ca63 --- /dev/null +++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch @@ -0,0 +1,25 @@ +From 449896c45b23f50c168d8d2789832024c906ec36 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Mon, 27 Jan 2020 05:31:13 -0600 +Subject: [PATCH 1/2] follow symlinks + +--- + plugins/kdecorations/aurorae/src/aurorae.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp +index fd723a8..fb95633 100644 +--- a/plugins/kdecorations/aurorae/src/aurorae.cpp ++++ b/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(); +-- +2.23.1 + diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch b/nixpkgs/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch new file mode 100644 index 000000000000..0505810abe60 --- /dev/null +++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch @@ -0,0 +1,25 @@ +From d584b075d71c4486710c0bbed6d44038f2ff5075 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Mon, 27 Jan 2020 05:31:23 -0600 +Subject: [PATCH 2/2] xwayland + +--- + xwl/xwayland.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp +index 5f17d39..b4b69ba 100644 +--- a/xwl/xwayland.cpp ++++ b/xwl/xwayland.cpp +@@ -145,7 +145,7 @@ void Xwayland::init() + + m_xwaylandProcess = new Process(this); + m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); +- m_xwaylandProcess->setProgram(QStringLiteral("Xwayland")); ++ m_xwaylandProcess->setProgram(QLatin1String(NIXPKGS_XWAYLAND)); + QProcessEnvironment env = m_app->processStartupEnvironment(); + env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd)); + env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM")); +-- +2.23.1 + 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..c3e9e2b9c245 --- /dev/null +++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/default.nix @@ -0,0 +1,51 @@ +{ + 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, mesa +}: + +# TODO (ttuegel): investigate qmlplugindump failure + +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 mesa + ]; + outputs = [ "bin" "dev" "out" ]; + patches = [ + ./0001-follow-symlinks.patch + ./0002-xwayland.patch + ]; + 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/scripts/krohnkite.nix b/nixpkgs/pkgs/desktops/plasma-5/kwin/scripts/krohnkite.nix new file mode 100644 index 000000000000..abd655db3753 --- /dev/null +++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/scripts/krohnkite.nix @@ -0,0 +1,39 @@ +{ lib, mkDerivation, fetchFromGitHub +, kcoreaddons, kwindowsystem, plasma-framework, systemsettings }: + +mkDerivation rec { + pname = "krohnkite"; + version = "0.7"; + + src = fetchFromGitHub { + owner = "esjeon"; + repo = "krohnkite"; + rev = "v${version}"; + sha256 = "0j3rm1w6d545qlmx02xs72b5zsigm48hp7lp7yh30z3cjqm00aap"; + }; + + buildInputs = [ + kcoreaddons kwindowsystem plasma-framework systemsettings + ]; + + dontBuild = true; + + # 1. --global still installs to $HOME/.local/share so we use --packageroot + # 2. plasmapkg2 doesn't copy metadata.desktop into place, so we do that manually + installPhase = '' + runHook preInstall + + plasmapkg2 --type kwinscript --install ${src}/res/ --packageroot $out/share/kwin/scripts + install -Dm644 ${src}/res/metadata.desktop $out/share/kservices5/krohnkite.desktop + + runHook postInstalll + ''; + + meta = with lib; { + description = "A dynamic tiling extension for KWin"; + license = licenses.mit; + maintainers = with maintainers; [ seqizz ]; + inherit (src.meta) homepage; + inherit (kwindowsystem.meta) platforms; + }; +} diff --git a/nixpkgs/pkgs/desktops/plasma-5/kwin/scripts/tiling.nix b/nixpkgs/pkgs/desktops/plasma-5/kwin/scripts/tiling.nix new file mode 100644 index 000000000000..d2c68d3cb7b2 --- /dev/null +++ b/nixpkgs/pkgs/desktops/plasma-5/kwin/scripts/tiling.nix @@ -0,0 +1,44 @@ +{ lib, mkDerivation, fetchFromGitHub +, kcoreaddons, kwindowsystem, plasma-framework, systemsettings }: + +mkDerivation rec { + pname = "kwin-tiling"; + version = "2.2"; + + src = fetchFromGitHub { + owner = "kwin-scripts"; + repo = "kwin-tiling"; + rev = "v${version}"; + sha256 = "1sx64xv7g9yh3j26zxxrbndv79xam9jq0vs00fczgfv2n0m7j7bl"; + }; + + # This is technically not needed, but we might as well clean up + postPatch = '' + rm release.sh + ''; + + buildInputs = [ + kcoreaddons kwindowsystem plasma-framework systemsettings + ]; + + dontBuild = true; + + # 1. --global still installs to $HOME/.local/share so we use --packageroot + # 2. plasmapkg2 doesn't copy metadata.desktop into place, so we do that manually + installPhase = '' + runHook preInstall + + plasmapkg2 --type kwinscript --install ${src} --packageroot $out/share/kwin/scripts + install -Dm644 ${src}/metadata.desktop $out/share/kservices5/kwin-script-tiling.desktop + + runHook postInstalll + ''; + + meta = with lib; { + description = "Tiling script for kwin"; + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg ]; + inherit (src.meta) homepage; + inherit (kwindowsystem.meta) platforms; + }; +} |