nixpkgs/pkgs/by-name/gn/gnome-pomodoro/fix-schema-path.patch
Herschenglime 768456183c gnome-pomodoro: 0.24.1 -> 0.26.0
Compile schemas manually to follow Nix conventions.

The gnome.post_install(glib_compile_schemas: true) param tries to
compile schemas in `<prefix>/<datadir>/glib-2.0/schemas`, which is not
compatible with the Nix way of handling gsettings schemas.

This commit patches that option out and manually adds a compilation step
to the preFixup hook, which fixes the issue and results in a fully
working local install of the program.
2024-09-30 11:57:19 +08:00

24 lines
887 B
Diff

diff --git a/meson.build b/meson.build
index 09857a1..a07d27c 100644
--- a/meson.build
+++ b/meson.build
@@ -40,7 +40,8 @@ add_project_arguments(
)
# We are going to use these variables later on for the plugins
-gschema_dir = get_option('prefix') / get_option('datadir') / 'glib-2.0' / 'schemas'
+nix_package_name = '@pname@' + '-' + '@version@'
+gschema_dir = get_option('prefix') / get_option('datadir') / 'gsettings-schemas' / nix_package_name / 'glib-2.0' / 'schemas'
plugin_libdir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'plugins'
extension_dir = get_option('prefix') / get_option('datadir') / 'gnome-shell' / 'extensions' / 'pomodoro@arun.codito.in'
@@ -134,7 +135,7 @@
subdir('tests')
gnome.post_install(
- glib_compile_schemas: true,
+ glib_compile_schemas: false,
gtk_update_icon_cache: true,
update_desktop_database: true,
)