From 9e9213e2ef54c44c72a84d403cbedea8b360ec53 Mon Sep 17 00:00:00 2001 From: Herschenglime Date: Sun, 29 Sep 2024 01:33:37 -0400 Subject: [PATCH 1/3] maintainers: add herschenglime This commit adds myself as a maintainer to the gnome-pomodoro package in addition to adding myself to the overall list. --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5431ce9a489d7..2349433d82b94 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8454,6 +8454,11 @@ githubId = 15121114; name = "Tom Herbers"; }; + herschenglime = { + github = "Herschenglime"; + githubId = 69494718; + name = "Herschenglime"; + }; hexa = { email = "hexa@darmstadt.ccc.de"; matrix = "@hexa:lossy.network"; From 768456183c5d9d1d5c089b4c57c73587132b7897 Mon Sep 17 00:00:00 2001 From: Herschenglime Date: Mon, 23 Sep 2024 23:36:05 -0400 Subject: [PATCH 2/3] 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 `//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. --- .../gn/gnome-pomodoro/fix-schema-path.patch | 35 +++--------- pkgs/by-name/gn/gnome-pomodoro/package.nix | 57 +++++++++++-------- 2 files changed, 41 insertions(+), 51 deletions(-) diff --git a/pkgs/by-name/gn/gnome-pomodoro/fix-schema-path.patch b/pkgs/by-name/gn/gnome-pomodoro/fix-schema-path.patch index 0750d01f86757..b7e6dfaa327b8 100644 --- a/pkgs/by-name/gn/gnome-pomodoro/fix-schema-path.patch +++ b/pkgs/by-name/gn/gnome-pomodoro/fix-schema-path.patch @@ -1,29 +1,3 @@ -diff --git a/data/meson.build b/data/meson.build -index 5e4ce69..982b3c9 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -31,7 +31,7 @@ i18n.merge_file( - - install_data( - 'org.gnome.pomodoro.gschema.xml', -- install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', -+ install_dir: gschema_dir, - ) - - subdir('icons') -diff --git a/meson-post-install.sh b/meson-post-install.sh -index bf4013a..c87fba4 100644 ---- a/meson-post-install.sh -+++ b/meson-post-install.sh -@@ -7,7 +7,7 @@ datadir="${prefix}/$1" - # want/need us to do the below - if [ -z "${DESTDIR}" ]; then - echo "Compiling GSchema..." -- glib-compile-schemas "${datadir}/glib-2.0/schemas" -+ glib-compile-schemas "${datadir}/gsettings-schemas/@pname@-@version@/glib-2.0/schemas" - - echo "Updating icon cache..." - gtk-update-icon-cache -f -t "${datadir}/icons/hicolor" diff --git a/meson.build b/meson.build index 09857a1..a07d27c 100644 --- a/meson.build @@ -38,3 +12,12 @@ index 09857a1..a07d27c 100644 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, + ) diff --git a/pkgs/by-name/gn/gnome-pomodoro/package.nix b/pkgs/by-name/gn/gnome-pomodoro/package.nix index f9e6bc7e97656..e163c3a7fa1a3 100644 --- a/pkgs/by-name/gn/gnome-pomodoro/package.nix +++ b/pkgs/by-name/gn/gnome-pomodoro/package.nix @@ -1,36 +1,36 @@ -{ lib -, stdenv -, fetchFromGitHub -, substituteAll -, meson -, ninja -, pkg-config -, wrapGAppsHook3 -, desktop-file-utils -, libcanberra -, gst_all_1 -, vala -, gtk3 -, gom -, sqlite -, libxml2 -, glib -, gobject-introspection -, json-glib -, libpeas -, gsettings-desktop-schemas -, gettext +{ + lib, + stdenv, + fetchFromGitHub, + substituteAll, + meson, + ninja, + pkg-config, + wrapGAppsHook3, + desktop-file-utils, + libcanberra, + gst_all_1, + vala, + gtk3, + gom, + sqlite, + libxml2, + glib, + gobject-introspection, + json-glib, + libpeas, + gsettings-desktop-schemas, + gettext, }: - stdenv.mkDerivation rec { pname = "gnome-pomodoro"; - version = "0.24.1"; + version = "0.26.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - hash = "sha256-Ml3znMz1Q9593rMgfAST8k9QglxMG9ocFD7W8kaFWCw="; + hash = "sha256-icyS/K6H90/DWYvqJ7f7XXTTuIwLea3k+vDDEBYil6o="; }; patches = [ @@ -42,6 +42,13 @@ stdenv.mkDerivation rec { }) ]; + # Manually compile schemas for package since meson option + # gnome.post_install(glib_compile_schemas) used by package tries to compile in + # the wrong dir. + preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + ''; + nativeBuildInputs = [ meson ninja From 76fa4651ee7326a89fd1773d3d053029b5cf3dde Mon Sep 17 00:00:00 2001 From: aleksana Date: Mon, 30 Sep 2024 15:58:15 +0800 Subject: [PATCH 3/3] gnome-pomodoro: add herschenglime to maintainers --- pkgs/by-name/gn/gnome-pomodoro/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gn/gnome-pomodoro/package.nix b/pkgs/by-name/gn/gnome-pomodoro/package.nix index e163c3a7fa1a3..6c7ee5e234318 100644 --- a/pkgs/by-name/gn/gnome-pomodoro/package.nix +++ b/pkgs/by-name/gn/gnome-pomodoro/package.nix @@ -83,7 +83,10 @@ stdenv.mkDerivation rec { This GNOME utility helps to manage time according to Pomodoro Technique. It intends to improve productivity and focus by taking short breaks. ''; - maintainers = with maintainers; [ aleksana ]; + maintainers = with maintainers; [ + aleksana + herschenglime + ]; license = licenses.gpl3Plus; platforms = platforms.linux; };