Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitty: fix locating libstartup-notification-1 #48747

Merged
merged 2 commits into from Oct 20, 2018
Merged

Conversation

vlaci
Copy link
Contributor

@vlaci vlaci commented Oct 20, 2018

Startup notification doesn't work in recent versions of Kitty:

Traceback (most recent call last):
File "/nix/store/3a3b0xd952gp8jw70k5kh3a4zhgzf0p7-kitty-0.12.3/bin/../lib/kitty/kitty/utils.py", line 216, in init_startup_notification
return init_startup_notification_x11(window_handle, startup_id)
File "/nix/store/3a3b0xd952gp8jw70k5kh3a4zhgzf0p7-kitty-0.12.3/bin/../lib/kitty/kitty/utils.py", line 201, in init_startup_notification_x11
return init_x11_startup_notification(display, window_handle, sid)
OSError: Failed to load libstartup-notification-1.so with error: libstartup-notification-1.so: cannot open shared object file: No such file or directory

Motivation for this change

Apparently dispatching of startup notification has been moved to a C
binding in kitty 0.6.0 [1] so the substituion had to be modified to reflect
that. Without this fix Kitty still works except that window managers
which depend on startup notifications to be fired (e.g. Awesome)
cannot apply special placement rules.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

[1]: kovidgoyal/kitty@b08f4ab

@Mic92
Copy link
Member

Mic92 commented Oct 20, 2018

Does this also affect 18.09?

@vlaci
Copy link
Contributor Author

vlaci commented Oct 20, 2018

Yes it does, however the Pyhon backtrace is not shown when using the 18.09 version which is 0.11.3 if I am not mistaken.

Vaskó László added 2 commits October 20, 2018 20:40
Startup notification doesn't work in recent versions of Kitty:
> Traceback (most recent call last):
>   File "/nix/store/3a3b0xd952gp8jw70k5kh3a4zhgzf0p7-kitty-0.12.3/bin/../lib/kitty/kitty/utils.py", line 216, in init_startup_notification
>     return init_startup_notification_x11(window_handle, startup_id)
>   File "/nix/store/3a3b0xd952gp8jw70k5kh3a4zhgzf0p7-kitty-0.12.3/bin/../lib/kitty/kitty/utils.py", line 201, in init_startup_notification_x11
>     return init_x11_startup_notification(display, window_handle, sid)
> OSError: Failed to load libstartup-notification-1.so with error: libstartup-notification-1.so: cannot open shared object file: No such file or directory

Apparently dispatching of startup notification has been moved to a C
binding in kitty 0.6.0 [1] so the substituion had to be modified to reflect
that. Without this fix Kitty still works except that window managers
which depend on startup notifications to be fired (e.g. Awesome)
cannot apply special placement rules.

The substitution mechanism is also changed to use a patch file to detect
this kind of mistakes in the future.

[1]: kovidgoyal/kitty@b08f4ab
The previous substitutution only worked by accident as make requires
environment variables to be enclosed in curly brackets as shown in this
excerpt from the build output:
> PYTHONPATH=YTHONPATH:.. HOME=MPDIR/nowhere sphinx-build -M html "." "_build" -T

The substituition is moved to the existing patch file to simplify the
builder expression.
@Mic92
Copy link
Member

Mic92 commented Oct 20, 2018

backport: 4d91833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants