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
|
2023-03-15 16:39:30 +00:00
|
|
|
|
, buildPackages
|
2023-10-19 13:55:26 +00:00
|
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
# 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";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
version = "46.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";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
hash = "sha256-STpGoRYbY4jVeqcvYyp5zpbELV/70dCwD0luxYdvhXU=";
|
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
|
2023-03-15 16:39:30 +00:00
|
|
|
|
] ++ lib.optionals withIntrospection [
|
2021-08-05 21:33:18 +00:00
|
|
|
|
gobject-introspection
|
2020-11-12 09:05:59 +00:00
|
|
|
|
];
|
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
|
mesonFlags = [
|
|
|
|
|
(lib.mesonBool "introspection" withIntrospection)
|
|
|
|
|
];
|
|
|
|
|
|
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; {
|
2023-03-04 12:14:45 +00:00
|
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas";
|
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;
|
|
|
|
|
};
|
|
|
|
|
}
|