summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5/kinfocenter/default.nix
blob: bbc8c03f37c19be50f7a4f273dc25ad3fa386e06 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{ mkDerivation
, lib
, extra-cmake-modules
, kdoctools
, qttools
, kcmutils
, kcompletion
, kconfig
, kconfigwidgets
, kcoreaddons
, kdbusaddons
, kdeclarative
, ki18n
, kiconthemes
, kio
, kirigami2
, kpackage
, kservice
, kwayland
, kwidgetsaddons
, kxmlgui
, solid
, systemsettings
, dmidecode
, fwupd
, libraw1394
, libusb1
, libGLU
, pciutils
, smartmontools
, util-linux
, vulkan-tools
, wayland-utils
, xdpyinfo
}:

let
  inherit (lib) getBin getExe;

  qdbus = "${getBin qttools}/bin/qdbus";

in
mkDerivation {
  pname = "kinfocenter";

  nativeBuildInputs = [ extra-cmake-modules kdoctools ];

  buildInputs = [
    kcmutils
    kcompletion
    kconfig
    kconfigwidgets
    kcoreaddons
    kdbusaddons
    kdeclarative
    ki18n
    kiconthemes
    kio
    kirigami2
    kpackage
    kservice
    kwayland
    kwidgetsaddons
    kxmlgui
    solid
    systemsettings

    dmidecode
    fwupd
    libraw1394
    libusb1
    libGLU
    pciutils
    smartmontools
    util-linux
    vulkan-tools
    wayland-utils
    xdpyinfo
  ];

  patches = [
    ./0001-tool-paths.patch
  ];

  postPatch = ''
    for f in Modules/kwinsupportinfo/{kcm_kwinsupportinfo.json.in,main.cpp}; do
      substituteInPlace $f \
        --replace "@qdbus@" "${qdbus}"
    done

    for f in Modules/xserver/{kcm_xserver.json,main.cpp}; do
      substituteInPlace $f \
        --replace "@xdpyinfo@" "${getExe xdpyinfo}"
    done
  '';

  # fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in
  # the same directory, while it is actually located in a completely different
  # store path
  preFixup = ''
    ln -sf ${systemsettings}/bin/systemsettings $out/bin/kinfocenter
  '';
}