3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/plasma-5/3rdparty/kwin/scripts/kzones.nix
Thomas Tuegel e967596380
Merge pull request #194353 from matthiasbeyer/update-kzones
plasma5Packages.kzones: 0.3 -> 0.4
2022-11-05 06:24:19 -05:00

50 lines
1.1 KiB
Nix

{ lib
, mkDerivation
, fetchFromGitHub
, kcoreaddons
, kwindowsystem
, plasma-framework
, systemsettings
}:
mkDerivation rec {
pname = "kzones";
version = "0.4";
src = fetchFromGitHub {
owner = "gerritdevriese";
repo = "kzones";
rev = "v${version}";
sha256 = "sha256-E5pi2ttar6bAt7s0m/NCw66Qgg5fL5p5QpXROWuUTvM=";
};
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-kzones.desktop
runHook postInstall
'';
meta = with lib; {
description = "KWin Script for snapping windows into zones";
maintainers = with maintainers; [ matthiasbeyer ];
license = licenses.gpl3Plus;
inherit (src.meta) homepage;
inherit (kwindowsystem.meta) platforms;
};
}