summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5/kwin
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-07-30 15:05:26 +0800
committerPeter Hoeg <peter@hoeg.com>2019-09-11 13:50:05 +0800
commit4a83f6ba01a05b17eb379d40ba7b481f176daa54 (patch)
tree6e6856dafc9eb806fce8ee1555b693cabf1f72f0 /pkgs/desktops/plasma-5/kwin
parente19054ab3cd5b7cc9a01d0efc71c8fe310541065 (diff)
downloadnixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar.gz
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar.bz2
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar.lz
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar.xz
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.tar.zst
nixpkgs-4a83f6ba01a05b17eb379d40ba7b481f176daa54.zip
kwin-tiling: init at 2.2
Diffstat (limited to 'pkgs/desktops/plasma-5/kwin')
-rw-r--r--pkgs/desktops/plasma-5/kwin/scripts/tiling.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/desktops/plasma-5/kwin/scripts/tiling.nix b/pkgs/desktops/plasma-5/kwin/scripts/tiling.nix
new file mode 100644
index 00000000000..d2c68d3cb7b
--- /dev/null
+++ b/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;
+  };
+}