@@ -0,0 +1,37 @@
1+{ lib, mkDerivation, fetchFromGitHub
2+, kcoreaddons, kwindowsystem, plasma-framework, systemsettings }:
3+
4+mkDerivation rec {
5+ pname = "parachute";
6+ version = "0.9.1";
7+
8+ src = fetchFromGitHub {
9+ owner = "tcorreabr";
10+ repo = "parachute";
11+ rev = "v${version}";
12+ sha256 = "QIWb1zIGfkS+Bef7LK+JA6XpwGUW+79XZY47j75nlCE=";
13+ };
14+
15+ buildInputs = [
16+ kcoreaddons kwindowsystem plasma-framework systemsettings
17+ ];
18+
19+ dontBuild = true;
20+
21+ # 1. --global still installs to $HOME/.local/share so we use --packageroot
22+ # 2. plasmapkg2 doesn't copy metadata.desktop into place, so we do that manually
23+ installPhase = ''
24+ runHook preInstall
25+ plasmapkg2 --type kwinscript --install ${src} --packageroot $out/share/kwin/scripts
26+ install -Dm644 ${src}/metadata.desktop $out/share/kservices5/Parachute.desktop
27+ runHook postInstall
28+ '';
29+
30+ meta = with lib; {
31+ description = "Look at your windows and desktops from above.";
32+ license = licenses.gpl3Only;
33+ maintainers = with maintainers; [ mjlbach ];
34+ inherit (src.meta) homepage;
35+ inherit (kwindowsystem.meta) platforms;
36+ };
37+}