nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 replaceVars,
5 buildPackages,
6 fetchurl,
7 meson,
8 ninja,
9 pkg-config,
10 perl,
11 gettext,
12 gtk3,
13 glib,
14 libnotify,
15 libgnomekbd,
16 libpulseaudio,
17 alsa-lib,
18 libcanberra-gtk3,
19 upower,
20 colord,
21 libgweather,
22 polkit,
23 gsettings-desktop-schemas,
24 geoclue2,
25 systemd,
26 libgudev,
27 libwacom,
28 libxslt,
29 libxml2,
30 modemmanager,
31 networkmanager,
32 gnome-desktop,
33 geocode-glib_2,
34 docbook_xsl,
35 wrapGAppsHook3,
36 python3,
37 tzdata,
38 gcr_4,
39 gnome-session-ctl,
40 udevCheckHook,
41 withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
42}:
43
44stdenv.mkDerivation (finalAttrs: {
45 pname = "gnome-settings-daemon";
46 version = "48.1";
47
48 src = fetchurl {
49 url = "mirror://gnome/sources/gnome-settings-daemon/${lib.versions.major finalAttrs.version}/gnome-settings-daemon-${finalAttrs.version}.tar.xz";
50 hash = "sha256-OGCi6iFNy8tmAK56HjNYpTiSFQh7w+SkfO4/h7ruBi4=";
51 };
52
53 patches = [
54 # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202
55 ./add-gnome-session-ctl-option.patch
56
57 (replaceVars ./fix-paths.patch {
58 inherit tzdata;
59 })
60 ];
61
62 depsBuildBuild = [
63 buildPackages.stdenv.cc
64 pkg-config
65 ];
66
67 nativeBuildInputs = [
68 meson
69 ninja
70 pkg-config
71 perl
72 gettext
73 glib
74 libxml2
75 libxslt
76 docbook_xsl
77 wrapGAppsHook3
78 python3
79 udevCheckHook
80 ];
81
82 buildInputs = [
83 gtk3
84 glib
85 gsettings-desktop-schemas
86 modemmanager
87 networkmanager
88 libnotify
89 libgnomekbd # for org.gnome.libgnomekbd.keyboard schema
90 gnome-desktop
91 libpulseaudio
92 alsa-lib
93 libcanberra-gtk3
94 upower
95 colord
96 libgweather
97 polkit
98 geocode-glib_2
99 geoclue2
100 libgudev
101 libwacom
102 gcr_4
103 ]
104 ++ lib.optionals withSystemd [
105 systemd
106 ];
107
108 mesonFlags = [
109 "-Dudev_dir=${placeholder "out"}/lib/udev"
110 (lib.mesonBool "systemd" withSystemd)
111 ]
112 ++ lib.optionals withSystemd [
113 "-Dgnome_session_ctl_path=${gnome-session-ctl}/libexec/gnome-session-ctl"
114 ];
115
116 # Default for release buildtype but passed manually because
117 # we're using plain
118 env.NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS";
119
120 postPatch = ''
121 for f in plugins/power/gsd-power-constants-update.pl; do
122 chmod +x $f
123 patchShebangs $f
124 done
125 '';
126
127 doInstallCheck = true;
128
129 meta = {
130 description = "GNOME Settings Daemon";
131 homepage = "https://gitlab.gnome.org/GNOME/gnome-settings-daemon/";
132 license = lib.licenses.gpl2Plus;
133 teams = [ lib.teams.pantheon ];
134 platforms = lib.platforms.linux;
135 };
136})