From 3f73cc2cf6dcbe24ef3318d0575ca9d444fb1eb7 Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 16 Aug 2024 09:42:00 +0300 Subject: [PATCH] kdePackages.kzones: init at 0.8 --- pkgs/kde/default.nix | 1 + pkgs/kde/third-party/kzones/default.nix | 45 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/kde/third-party/kzones/default.nix diff --git a/pkgs/kde/default.nix b/pkgs/kde/default.nix index 0890c7e96376..607b54d17c23 100644 --- a/pkgs/kde/default.nix +++ b/pkgs/kde/default.nix @@ -80,6 +80,7 @@ applet-window-buttons6 = self.callPackage ./third-party/applet-window-buttons6 {}; karousel = self.callPackage ./third-party/karousel {}; + kzones = self.callPackage ./third-party/kzones {}; } ); in diff --git a/pkgs/kde/third-party/kzones/default.nix b/pkgs/kde/third-party/kzones/default.nix new file mode 100644 index 000000000000..a53d88af099a --- /dev/null +++ b/pkgs/kde/third-party/kzones/default.nix @@ -0,0 +1,45 @@ +{ + lib, + stdenv, + fetchFromGitHub, + kpackage, + kwin, + zip, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "kzones"; + version = "0.8"; + + src = fetchFromGitHub { + owner = "gerritdevriese"; + repo = "kzones"; + rev = "v${finalAttrs.version}"; + hash = "sha256-6cZJEcvynlP9nXyBKRst8Bca0d8Mh51ft7ocRrgCV7w="; + }; + + nativeBuildInputs = [ + kpackage + zip + ]; + buildInputs = [ kwin ]; + dontWrapQtApps = true; + + buildFlags = [ "build" ]; + + installPhase = '' + runHook preInstall + + kpackagetool6 --type=KWin/Script --install=kzones.kwinscript --packageroot=$out/share/kwin/scripts + + runHook postInstall + ''; + + meta = { + description = "KDE KWin Script for snapping windows into zones"; + homepage = "https://github.com/gerritdevriese/kzones/"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ k900 ]; + platforms = lib.platforms.all; + }; +})