2021-02-05 17:12:51 +00:00
|
|
|
|
{ lib, stdenv
|
2020-11-12 09:05:59 +00:00
|
|
|
|
, fetchurl
|
2021-02-05 17:12:51 +00:00
|
|
|
|
, pkg-config
|
2020-11-12 09:05:59 +00:00
|
|
|
|
, glib
|
|
|
|
|
, gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, python3
|
|
|
|
|
# just for passthru
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, gnome
|
2020-11-12 09:05:59 +00:00
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "gsettings-desktop-schemas";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
version = "42.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
sha256 = "ZoYzWp7WI/euInb++lCkENTnHUIxiAgkcUBwyzFzI9I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
|
strictDeps = true;
|
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
glib
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
|
pkg-config
|
2020-11-12 09:05:59 +00:00
|
|
|
|
python3
|
2021-08-05 21:33:18 +00:00
|
|
|
|
gobject-introspection
|
2020-11-12 09:05:59 +00:00
|
|
|
|
];
|
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
|
mesonFlags = [
|
|
|
|
|
"-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
|
2020-11-12 09:05:59 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
chmod +x build-aux/meson/post-install.py
|
|
|
|
|
patchShebangs build-aux/meson/post-install.py
|
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
preInstall = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
|
# Meson installs the schemas to share/glib-2.0/schemas
|
|
|
|
|
# We add the override file there too so it will be compiled and later moved by
|
|
|
|
|
# glib's setup hook.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
mkdir -p $out/share/glib-2.0/schemas
|
|
|
|
|
cat - > $out/share/glib-2.0/schemas/remove-backgrounds.gschema.override <<- EOF
|
2022-04-27 09:35:20 +00:00
|
|
|
|
# These paths are supposed to refer to gnome-backgrounds
|
|
|
|
|
# but since we do not use FHS, they are broken.
|
|
|
|
|
# And we do not want to hardcode the correct paths
|
|
|
|
|
# since then every GTK app would pull in gnome-backgrounds.
|
|
|
|
|
# Let’s just override the broken paths so that people are not confused.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
[org.gnome.desktop.background]
|
|
|
|
|
picture-uri='''
|
2022-04-27 09:35:20 +00:00
|
|
|
|
picture-uri-dark='''
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
[org.gnome.desktop.screensaver]
|
|
|
|
|
picture-uri='''
|
|
|
|
|
EOF
|
|
|
|
|
'';
|
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
updateScript = gnome.updateScript {
|
2020-11-12 09:05:59 +00:00
|
|
|
|
packageName = pname;
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-11-12 09:05:59 +00:00
|
|
|
|
description = "Collection of GSettings schemas for settings shared by various components of a desktop";
|
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
|
};
|
|
|
|
|
}
|