nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

Temporary ABI incompatibility between plugins built for upstream rofi and rofi-wayland

Open myned opened this issue 2 years ago • 6 comments

Describe the bug

Plugins that are built for release rofi (1.7.5) are ABI incompatible with rofi-wayland (1.7.5+wayland2/3) until the next upstream release, resulting in runtime errors when attempting to run rofi with those plugins enabled (namely rofi-calc):

(process:124485): Rofi-WARNING **: 23:02:32.891: ABI version of plugin: 'calc.so' does not match: 00000006 expecting: 00000007

Those plugins need to be built against rofi-wayland instead of upstream rofi. This can be worked around in nixpkgs by overriding the rofi-unwrapped package in the plugin module:

(pkgs.rofi-calc.override {
  rofi-unwrapped = rofi-wayland-unwrapped;
})

Steps To Reproduce

  1. Build rofi-wayland with rofi-calc plugin (overlay or home-manager)
  2. Execute rofi -modes calc -show calc in terminal
  3. Observe error message "Mode calc is not found." with above warning printed in terminal

Expected behavior

  1. Observe rofi-calc operating normally

Additional context

This is more a reference for those encountering the bug than an actionable issue.

The incompatibility should only last until the next rofi release, but something of this nature that requires different build inputs for plugins may occur again in the future considering that rofi-wayland strays behind upstream by design. In which case, anything that can be done through nixpkgs would be welcome, though home-manager seems like it would be the best place to handle that as it already exposes options for plugins.

Notify maintainers

rofi(-wayland): @bew rofi-calc: @luc65r @albakham

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.0-zen1, NixOS, 24.05 (Uakari), 24.05.20240323.44d0940`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/amxd2p02wx78nyaa4bkb0hjvgwhz1dq7-source`

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

myned avatar Mar 24 '24 04:03 myned

Can I do something on distro other than NixOS or it is better just to wait?

pavukach avatar Apr 03 '24 21:04 pavukach

For other distros, you can build rofi-calc from source using rofi-wayland headers, or probably downgrade rofi-wayland to version 1.7.5+wayland1, but the latter is untested and you may run into other issues that are fixed with recent versions.

myned avatar Apr 03 '24 21:04 myned

Maybe related (?): I get a collision error when using any plugin

> error: collision between `/nix/store/yi64...-rofi-1.7.5+wayland3/bin/rofi' and `/nix/store/sr361...-rofi-1.7.5+wayland3/bin/rofi'
pkgs.rofi-wayland.override { plugins = [pkgs.rofi-calc]; };

Tried with override:

(final: prev: {
    rofi-calc = prev.rofi-calc.override {rofi-unwrapped = prev.rofi-wayland-unwrapped;};
})

Should I open a separate Issue for this?

sdaqo avatar Jul 01 '24 12:07 sdaqo

@sdaqo

A collision is likely due to different derivations of rofi being used in your configuration, which is not this issue:

/nix/store/yi64...-rofi-1.7.5+wayland3/bin/rofi /nix/store/sr361...-rofi-1.7.5+wayland3/bin/rofi

In this case, you may have references to pkgs.rofi-wayland that are not overridden to include plugins. I use the home-manager options instead of overrides myself, so I may be reading the situation incorrectly.

myned avatar Jul 03 '24 20:07 myned

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/rofi-calc-not-working-with-rofi-wayland/51301/2

nixos-discourse avatar Dec 02 '24 21:12 nixos-discourse

This issue has mostly been fixed by the rofi-wayland 1.7.7+wayland1 release in unstable, so this can be closed if preemptive measures are not planned for nixpkgs.

myned avatar Feb 08 '25 19:02 myned