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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
{ fetchurl
, lib
, stdenv
, substituteAll
, accountsservice
, adwaita-icon-theme
, colord
, colord-gtk4
, cups
, dbus
, docbook-xsl-nons
, fontconfig
, gdk-pixbuf
, gettext
, glib
, glib-networking
, gcr_4
, glibc
, gnome-bluetooth
, gnome-color-manager
, gnome-desktop
, gnome-online-accounts
, gnome-settings-daemon
, gnome-tecla
, gnome
, gsettings-desktop-schemas
, gsound
, gst_all_1
, gtk4
, ibus
, json-glib
, libgtop
, libgudev
, libadwaita
, libkrb5
, libjxl
, libpulseaudio
, libpwquality
, librsvg
, webp-pixbuf-loader
, libsecret
, libsoup_3
, libwacom
, libXi
, libxml2
, libxslt
, meson
, modemmanager
, mutter
, networkmanager
, networkmanagerapplet
, libnma-gtk4
, ninja
, pkg-config
, polkit
, python3
, samba
, setxkbmap
, shadow
, shared-mime-info
, sound-theme-freedesktop
, tracker
, tracker-miners
, tzdata
, udisks2
, upower
, libepoxy
, gnome-user-share
, gnome-remote-desktop
, wrapGAppsHook4
, xorgserver
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gnome-control-center";
version = "46.3";
src = fetchurl {
url = "mirror://gnome/sources/gnome-control-center/${lib.versions.major finalAttrs.version}/gnome-control-center-${finalAttrs.version}.tar.xz";
hash = "sha256-l9xsfR3uGVkU88vIRbaBZLdhFIDYk760EQBsFerkbLk=";
};
patches = [
(substituteAll {
src = ./paths.patch;
gcm = gnome-color-manager;
inherit glibc tzdata shadow;
inherit cups networkmanagerapplet;
})
];
nativeBuildInputs = [
docbook-xsl-nons
gettext
libxslt
meson
ninja
pkg-config
python3
shared-mime-info
wrapGAppsHook4
];
buildInputs = [
accountsservice
adwaita-icon-theme
colord
colord-gtk4
cups
fontconfig
gdk-pixbuf
glib
glib-networking
gcr_4
gnome-bluetooth
gnome-desktop
gnome-online-accounts
gnome-remote-desktop # optional, sharing panel
gnome-settings-daemon
gnome-tecla
gnome-user-share # optional, sharing panel
gsettings-desktop-schemas
gsound
gtk4
ibus
json-glib
libepoxy
libgtop
libgudev
libadwaita
libkrb5
libnma-gtk4
libpulseaudio
libpwquality
librsvg
libsecret
libsoup_3
libwacom
libXi
libxml2
modemmanager
mutter # schemas for the keybindings
networkmanager
polkit
samba
tracker
tracker-miners # for search locations dialog
udisks2
upower
] ++ (with gst_all_1; [
# For animations in Mouse panel.
gst-plugins-base
gst-plugins-good
]);
nativeCheckInputs = [
dbus
python3.pkgs.pygobject3 # for test-networkmanager-service.py
python3.pkgs.python-dbusmock
setxkbmap
xorgserver # for Xvfb
];
doCheck = true;
preConfigure = ''
# For ITS rules
addToSearchPath "XDG_DATA_DIRS" "${polkit.out}/share"
'';
preCheck = ''
# Basically same as https://github.com/NixOS/nixpkgs/pull/141299
export ADW_DISABLE_PORTAL=1
export XDG_DATA_DIRS=${glib.getSchemaDataDirPath gsettings-desktop-schemas}
'';
postInstall = ''
# Pull in WebP and JXL support for gnome-backgrounds.
# In postInstall to run before gappsWrapperArgsHook.
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
extraLoaders = [
libjxl
librsvg
webp-pixbuf-loader
];
}}"
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${sound-theme-freedesktop}/share"
# Thumbnailers (for setting user profile pictures)
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
--prefix XDG_DATA_DIRS : "${librsvg}/share"
# WM keyboard shortcuts
--prefix XDG_DATA_DIRS : "${mutter}/share"
)
for i in $out/share/applications/*; do
substituteInPlace $i --replace "Exec=gnome-control-center" "Exec=$out/bin/gnome-control-center"
done
'';
separateDebugInfo = true;
passthru = {
updateScript = gnome.updateScript {
packageName = "gnome-control-center";
attrPath = "gnome.gnome-control-center";
};
};
meta = with lib; {
description = "Utilities to configure the GNOME desktop";
mainProgram = "gnome-control-center";
license = licenses.gpl2Plus;
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
})
|