1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 kpackage,
6 kwin,
7}:
8
9stdenv.mkDerivation {
10 pname = "dynamic-workspaces";
11 version = "3.2";
12
13 src = fetchFromGitHub {
14 owner = "d86leader";
15 repo = "dynamic_workspaces";
16 # 3.2 was released on KDE Store but not tagged.
17 rev = "a06e723804398d672be74eba0cd4ccee062e1410";
18 hash = "sha256-fOxWVj6bB5nBiPXvVvjwc3MVjKWaOniqPe7UnsPsusE=";
19 };
20
21 nativeBuildInputs = [
22 kpackage
23 ];
24
25 buildInputs = [
26 kwin
27 ];
28
29 dontBuild = true;
30 dontWrapQtApps = true;
31
32 installPhase = ''
33 runHook preInstall
34
35 kpackagetool6 --type KWin/Script --install $src --packageroot $out/share/kwin/scripts
36
37 runHook postInstall
38 '';
39
40 meta = {
41 description = "KWin script that automatically adds/removes virtual desktops";
42 homepage = "https://github.com/maurges/dynamic_workspaces";
43 license = lib.licenses.bsd3;
44 maintainers = with lib.maintainers; [ federicoschonborn ];
45 platforms = lib.platforms.all;
46 };
47}