ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / gn / gnome-control-center / package.nix
blob9600b529c8880286932bdbd59a8bc3f20336d854
2   fetchurl,
3   lib,
4   stdenv,
5   substituteAll,
6   accountsservice,
7   adwaita-icon-theme,
8   colord,
9   colord-gtk4,
10   cups,
11   dbus,
12   docbook-xsl-nons,
13   fontconfig,
14   gdk-pixbuf,
15   gettext,
16   glib,
17   glib-networking,
18   gcr_4,
19   glibc,
20   gnome-bluetooth,
21   gnome-color-manager,
22   gnome-desktop,
23   gnome-online-accounts,
24   gnome-settings-daemon,
25   gnome-tecla,
26   gnome,
27   gsettings-desktop-schemas,
28   gsound,
29   gst_all_1,
30   gtk4,
31   ibus,
32   json-glib,
33   libgtop,
34   libgudev,
35   libadwaita,
36   libkrb5,
37   libjxl,
38   libpulseaudio,
39   libpwquality,
40   librsvg,
41   webp-pixbuf-loader,
42   libsecret,
43   libsoup_3,
44   libwacom,
45   libXi,
46   libxml2,
47   libxslt,
48   meson,
49   modemmanager,
50   mutter,
51   networkmanager,
52   networkmanagerapplet,
53   libnma-gtk4,
54   ninja,
55   pkg-config,
56   polkit,
57   python3,
58   samba,
59   setxkbmap,
60   shadow,
61   shared-mime-info,
62   sound-theme-freedesktop,
63   tinysparql,
64   localsearch,
65   tzdata,
66   udisks2,
67   upower,
68   libepoxy,
69   gnome-user-share,
70   gnome-remote-desktop,
71   wrapGAppsHook4,
72   xorgserver,
75 stdenv.mkDerivation (finalAttrs: {
76   pname = "gnome-control-center";
77   version = "47.1.1";
79   src = fetchurl {
80     url = "mirror://gnome/sources/gnome-control-center/${lib.versions.major finalAttrs.version}/gnome-control-center-${finalAttrs.version}.tar.xz";
81     hash = "sha256-BR/UBXFX9LIzcBP778luPRKWVOP8lg1ISdNUJSQAvnc=";
82   };
84   patches = [
85     (substituteAll {
86       src = ./paths.patch;
87       gcm = gnome-color-manager;
88       inherit glibc tzdata shadow;
89       inherit cups networkmanagerapplet;
90     })
91   ];
93   nativeBuildInputs = [
94     docbook-xsl-nons
95     gettext
96     libxslt
97     meson
98     ninja
99     pkg-config
100     python3
101     shared-mime-info
102     wrapGAppsHook4
103   ];
105   buildInputs = [
106     accountsservice
107     adwaita-icon-theme
108     colord
109     colord-gtk4
110     cups
111     fontconfig
112     gdk-pixbuf
113     glib
114     glib-networking
115     gcr_4
116     gnome-bluetooth
117     gnome-desktop
118     gnome-online-accounts
119     gnome-remote-desktop # optional, sharing panel
120     gnome-settings-daemon
121     gnome-tecla
122     gnome-user-share # optional, sharing panel
123     gsettings-desktop-schemas
124     gsound
125     gtk4
126     ibus
127     json-glib
128     libepoxy
129     libgtop
130     libgudev
131     libadwaita
132     libkrb5
133     libnma-gtk4
134     libpulseaudio
135     libpwquality
136     librsvg
137     libsecret
138     libsoup_3
139     libwacom
140     libXi
141     libxml2
142     modemmanager
143     mutter # schemas for the keybindings
144     networkmanager
145     polkit
146     samba
147     tinysparql
148     localsearch # for search locations dialog
149     udisks2
150     upower
151     # For animations in Mouse panel.
152     gst_all_1.gst-plugins-base
153     gst_all_1.gst-plugins-good
154     # vp9alphadecodebin, observed from GST_DEBUG="*:3" warnings.
155     # https://github.com/NixOS/nixpkgs/pull/333911#issuecomment-2409233470
156     gst_all_1.gst-plugins-bad
157   ];
159   nativeCheckInputs = [
160     dbus
161     python3.pkgs.pygobject3 # for test-networkmanager-service.py
162     python3.pkgs.python-dbusmock
163     setxkbmap
164     xorgserver # for Xvfb
165   ];
167   doCheck = true;
169   preConfigure = ''
170     # For ITS rules
171     addToSearchPath "XDG_DATA_DIRS" "${polkit.out}/share"
172   '';
174   preCheck = ''
175     # Basically same as https://github.com/NixOS/nixpkgs/pull/141299
176     export ADW_DISABLE_PORTAL=1
177     export XDG_DATA_DIRS=${glib.getSchemaDataDirPath gsettings-desktop-schemas}
178   '';
180   postInstall = ''
181     # Pull in WebP and JXL support for gnome-backgrounds.
182     # In postInstall to run before gappsWrapperArgsHook.
183     export GDK_PIXBUF_MODULE_FILE="${
184       gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
185         extraLoaders = [
186           libjxl
187           librsvg
188           webp-pixbuf-loader
189         ];
190       }
191     }"
192   '';
194   preFixup = ''
195     gappsWrapperArgs+=(
196       --prefix XDG_DATA_DIRS : "${sound-theme-freedesktop}/share"
197       # Thumbnailers (for setting user profile pictures)
198       --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
199       --prefix XDG_DATA_DIRS : "${librsvg}/share"
200       # WM keyboard shortcuts
201       --prefix XDG_DATA_DIRS : "${mutter}/share"
202     )
203   '';
205   separateDebugInfo = true;
207   passthru = {
208     updateScript = gnome.updateScript {
209       packageName = "gnome-control-center";
210     };
211   };
213   meta = with lib; {
214     description = "Utilities to configure the GNOME desktop";
215     mainProgram = "gnome-control-center";
216     license = licenses.gpl2Plus;
217     maintainers = teams.gnome.members;
218     platforms = platforms.linux;
219   };