about summary refs log tree commit diff
path: root/nixpkgs/pkgs/kde/plasma/plasma-desktop/default.nix
blob: a84a55779d3658bf5de4855b299e4776e71ca5a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  lib,
  mkKdeDerivation,
  runCommandLocal,
  makeWrapper,
  glib,
  gsettings-desktop-schemas,
  substituteAll,
  util-linux,
  pkg-config,
  qtsvg,
  qtwayland,
  breeze,
  kaccounts-integration,
  SDL2,
  xkeyboard_config,
  xorg,
  libcanberra,
  libxkbfile,
  ibus,
}: let
  # run gsettings with desktop schemas for using in "kcm_access" kcm
  # and in kaccess
  gsettings-wrapper = runCommandLocal "gsettings-wrapper" {nativeBuildInputs = [makeWrapper];} ''
    mkdir -p $out/bin
    makeWrapper ${glib}/bin/gsettings $out/bin/gsettings --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
  '';
in
  mkKdeDerivation {
    pname = "plasma-desktop";

    patches = [
      (substituteAll {
        src = ./hwclock-path.patch;
        hwclock = "${lib.getBin util-linux}/bin/hwclock";
      })
      (substituteAll {
        src = ./kcm-access.patch;
        gsettings = "${gsettings-wrapper}/bin/gsettings";
      })
      ./tzdir.patch
      ./no-discover-shortcut.patch
      (substituteAll {
        src = ./wallpaper-paths.patch;
        wallpapers = "${lib.getBin breeze}/share/wallpapers";
      })
    ];

    extraNativeBuildInputs = [pkg-config];
    extraBuildInputs = [
      qtsvg
      qtwayland

      kaccounts-integration

      SDL2
      libcanberra
      libxkbfile
      xkeyboard_config

      xorg.libXcursor
      xorg.libXft
      xorg.xf86inputlibinput
      xorg.xf86inputevdev
      xorg.xorgserver

      ibus
    ];

    # wrap kaccess with wrapped gsettings so it can access accessibility schemas
    qtWrapperArgs = ["--prefix PATH : ${lib.makeBinPath [gsettings-wrapper]}"];
  }