NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.51k stars 12.99k forks source link

Update request: gnome.pomodoro 0.24.1 → 0.25.1 #314999

Open Herschenglime opened 1 month ago

Herschenglime commented 1 month ago

Notify maintainers @jtojnar - I saw that you merged the last update from a bot

The current version's main app still works but the extension component is broken on gnome 46.1.

I tried simply doing the version bump with the following overlay:

    # see "Overriding a package inside a scope" in overlay wiki page
    # gnome scope overrides:
    gnome = prev.gnome.overrideScope' (gfinal: gprev: {
      # update gnome pomodoro to work on 46
      pomodoro = let
      in gprev.pomodoro.overrideAttrs (oldAttrs: rec {
        pname = "gnome-pomodoro";
        version = "0.25.1";
        src = prev.fetchFromGitHub {
          owner = pname;
          repo = pname;
          rev = version;
          hash = "sha256-tvNZqOw0XQF+3tD5b44LimPMHkmbYTu5wTtQfLHCgzo=";
        };
      });
    });

But the build fails because its unable to patch meson-post-install.sh:

gnome-pomodoro> building '/nix/store/x0ppil5xd59w81yzw98j7z3skbrxz6w5-gnome-pomodoro-0.25.1.drv'
gnome-pomodoro> Running phase: unpackPhase
gnome-pomodoro> unpacking source archive /nix/store/zhf40gsili4mg3scfhkh6740y2n0ia8g-source
gnome-pomodoro> source root is source
gnome-pomodoro> Running phase: patchPhase
gnome-pomodoro> applying patch /nix/store/s716ayi7iprbi9f3jn8g24ybwq65y5mq-fix-schema-path.patch
gnome-pomodoro> patching file data/meson.build
gnome-pomodoro> Hunk #1 succeeded at 52 (offset 21 lines).
gnome-pomodoro> can't find file to patch at input line 18
gnome-pomodoro> Perhaps you used the wrong -p or --strip option?
gnome-pomodoro> The text leading up to this was:
gnome-pomodoro> --------------------------
gnome-pomodoro> |diff --git a/meson-post-install.sh b/meson-post-install.sh
gnome-pomodoro> |index bf4013a..c87fba4 100644
gnome-pomodoro> |--- a/meson-post-install.sh
gnome-pomodoro> |+++ b/meson-post-install.sh
gnome-pomodoro> --------------------------
gnome-pomodoro> File to patch: 
gnome-pomodoro> Skip this patch? [y] 
gnome-pomodoro> Skipping patch.
gnome-pomodoro> 1 out of 1 hunk ignored
gnome-pomodoro> patching file meson.build
gnome-pomodoro> Hunk #1 succeeded at 42 (offset 2 lines).
error: builder for '/nix/store/x0ppil5xd59w81yzw98j7z3skbrxz6w5-gnome-pomodoro-0.25.1.drv' failed with exit code 1;

I'm not sure if there's something wrong with my overlay or something that needs to be changed about the patch script. Would this happen if something changed upstream?

Thanks!


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

Herschenglime commented 1 month ago

It does indeed seem like the meson-post-install.sh script was removed in this commit: https://github.com/gnome-pomodoro/gnome-pomodoro/commit/ce4b085006dda342db9a563302f8ffdafb569f95

I'll try to modify the patch accordingly so it doesn't try to edit a non-existent file and make a PR if it works. If it doesn't though, I think I'd need some guidance as I'm not entirely sure of the reasons behind the changes in the patch.

jtojnar commented 1 month ago

On FHS dustros, package manager typically recompiles global /usr/share/glib-2.0/schemas/gschemas.compiled file on installation. Since we want Nix packages to work without installation, we compile the file for each package during package build. But to avoid multiple packagesʼ schenas colliding when added to buildEnv created symlink tree, we use different directory per package (path contains derivation name). The purpose of the patch is to facilitate this.

Normally, the move is handled automatically by glibʼs setup hook in postInstall, but since the project hardcodes the schema path and knows nothing about our convention, we need to patch it (we do that in the meson.build part of the patch).

Changing the install directory in data/meson.build is not strictly necessary, as the aforementioned glib setup hook can handle that later. In fact, it should be removed since the meson.post_install() function that replaces the script does not support our convention either.

On Mon, 27 May 2024, 06:04 Herschenglime, @.***> wrote:

It does indeed seem like the meson-post-install.sh script was removed in this commit: @.*** https://github.com/gnome-pomodoro/gnome-pomodoro/commit/ce4b085006dda342db9a563302f8ffdafb569f95

I'll try to modify the patch accordingly so it doesn't try to edit a non-existent file and make a PR if it works. If it doesn't though, I think I'd need some guidance as I'm not entirely sure of the reasons behind the changes in the patch.

— Reply to this email directly, view it on GitHub https://github.com/NixOS/nixpkgs/issues/314999#issuecomment-2132600850, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMEY4UPHXCTN5EVY2632TZEKWDRAVCNFSM6AAAAABIKNCZUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGYYDAOBVGA . You are receiving this because you were mentioned.Message ID: @.***>

ljuzig commented 5 days ago

Any update on this? gnome.pomodoro is currently broken on the latest NixOS (due to GNOME 46). Thank you.