1{
2 mkDerivation,
3 lib,
4 extra-cmake-modules,
5 kdoctools,
6 wayland-scanner,
7 boost,
8 fontconfig,
9 ibus,
10 libXcursor,
11 libXft,
12 libcanberra_kde,
13 libpulseaudio,
14 libxkbfile,
15 xf86inputevdev,
16 xf86inputsynaptics,
17 xinput,
18 xkeyboard_config,
19 xorgserver,
20 util-linux,
21 wayland,
22 wayland-protocols,
23 accounts-qt,
24 qtdeclarative,
25 qtquickcontrols,
26 qtquickcontrols2,
27 qtsvg,
28 qtx11extras,
29 attica,
30 baloo,
31 kaccounts-integration,
32 kactivities,
33 kactivities-stats,
34 kauth,
35 kcmutils,
36 kdbusaddons,
37 kdeclarative,
38 kded,
39 kdelibs4support,
40 kemoticons,
41 kglobalaccel,
42 ki18n,
43 kitemmodels,
44 knewstuff,
45 knotifications,
46 knotifyconfig,
47 kpeople,
48 krunner,
49 kscreenlocker,
50 kwallet,
51 kwin,
52 phonon,
53 plasma-framework,
54 plasma-workspace,
55 qqc2-desktop-style,
56 xf86inputlibinput,
57 glib,
58 gsettings-desktop-schemas,
59 runCommandLocal,
60 makeWrapper,
61}:
62let
63 # run gsettings with desktop schemas for using in "kcm_access" kcm
64 # and in kaccess
65 gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
66 mkdir -p $out/bin
67 makeWrapper ${glib}/bin/gsettings $out/bin/gsettings --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
68 '';
69in
70mkDerivation {
71 pname = "plasma-desktop";
72 nativeBuildInputs = [
73 extra-cmake-modules
74 kdoctools
75 wayland-scanner
76 ];
77 buildInputs = [
78 boost
79 fontconfig
80 ibus
81 libcanberra_kde
82 libpulseaudio
83 libXcursor
84 libXft
85 xorgserver
86 libxkbfile
87 phonon
88 xf86inputlibinput
89 xf86inputevdev
90 xf86inputsynaptics
91 xinput
92 xkeyboard_config
93 wayland
94 wayland-protocols
95
96 accounts-qt
97 qtdeclarative
98 qtquickcontrols
99 qtquickcontrols2
100 qtsvg
101 qtx11extras
102
103 attica
104 baloo
105 kaccounts-integration
106 kactivities
107 kactivities-stats
108 kauth
109 kcmutils
110 kdbusaddons
111 kdeclarative
112 kded
113 kdelibs4support
114 kemoticons
115 kglobalaccel
116 ki18n
117 kitemmodels
118 knewstuff
119 knotifications
120 knotifyconfig
121 kpeople
122 krunner
123 kscreenlocker
124 kwallet
125 kwin
126 plasma-framework
127 plasma-workspace
128 qqc2-desktop-style
129 ];
130
131 patches = [
132 ./hwclock-path.patch
133 ./tzdir.patch
134 ./kcm-access.patch
135 ./no-discover-shortcut.patch
136 ];
137 CXXFLAGS = [
138 ''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/bin/hwclock\"''
139 ''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}/bin/gsettings\"''
140 ];
141 postInstall = ''
142 # Display ~/Desktop contents on the desktop by default.
143 sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \
144 -e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/'
145 '';
146
147 # wrap kaccess with wrapped gsettings so it can access accessibility schemas
148 qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ gsettings-wrapper ]}" ];
149}