evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / gn / gnome-settings-daemon / package.nix
blob3d242a245b6708c4ee4afb705f7a3206f252d589
2   stdenv,
3   lib,
4   substituteAll,
5   fetchurl,
6   meson,
7   ninja,
8   pkg-config,
9   gnome,
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   withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
43 stdenv.mkDerivation (finalAttrs: {
44   pname = "gnome-settings-daemon";
45   version = "47.1";
47   src = fetchurl {
48     url = "mirror://gnome/sources/gnome-settings-daemon/${lib.versions.major finalAttrs.version}/gnome-settings-daemon-${finalAttrs.version}.tar.xz";
49     hash = "sha256-8qrL5V+jjocIWD7sCmZRBJ5TfrUFo+0s4Lqk6bZCRtE=";
50   };
52   patches = [
53     # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202
54     ./add-gnome-session-ctl-option.patch
56     (substituteAll {
57       src = ./fix-paths.patch;
58       inherit tzdata;
59     })
60   ];
62   nativeBuildInputs = [
63     meson
64     ninja
65     pkg-config
66     perl
67     gettext
68     libxml2
69     libxslt
70     docbook_xsl
71     wrapGAppsHook3
72     python3
73   ];
75   buildInputs =
76     [
77       gtk3
78       glib
79       gsettings-desktop-schemas
80       modemmanager
81       networkmanager
82       libnotify
83       libgnomekbd # for org.gnome.libgnomekbd.keyboard schema
84       gnome-desktop
85       libpulseaudio
86       alsa-lib
87       libcanberra-gtk3
88       upower
89       colord
90       libgweather
91       polkit
92       geocode-glib_2
93       geoclue2
94       libgudev
95       libwacom
96       gcr_4
97     ]
98     ++ lib.optionals withSystemd [
99       systemd
100     ];
102   mesonFlags =
103     [
104       "-Dudev_dir=${placeholder "out"}/lib/udev"
105       (lib.mesonBool "systemd" withSystemd)
106     ]
107     ++ lib.optionals withSystemd [
108       "-Dgnome_session_ctl_path=${gnome-session-ctl}/libexec/gnome-session-ctl"
109     ];
111   # Default for release buildtype but passed manually because
112   # we're using plain
113   env.NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS";
115   postPatch = ''
116     for f in plugins/power/gsd-power-constants-update.pl; do
117       chmod +x $f
118       patchShebangs $f
119     done
120   '';
122   passthru = {
123     updateScript = gnome.updateScript {
124       packageName = "gnome-settings-daemon";
125     };
126   };
128   meta = with lib; {
129     license = licenses.gpl2Plus;
130     maintainers = teams.gnome.members;
131     platforms = platforms.linux;
132   };