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

[20.09] fix passing qt5 version to pythonInterpreters #98854

Merged
merged 1 commit into from Sep 27, 2020

Conversation

erictapen
Copy link
Member

@erictapen erictapen commented Sep 26, 2020

Motivation for this change

My qutebrowser stopped working on nixos-20.09:

$ qutebrowser 
13:27:27 INFO: Could not load the Qt platform plugin "xcb" in "" even though it was found.
13:27:27 CRITICAL: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Fatal Python error: Aborted

Current thread 0x00007f3bbd085f40 (most recent call first):
  File "/nix/store/3fvywg6zzkbp1kcjy0zxkx4yllr9d9xk-qutebrowser-1.13.1/lib/python3.8/site-packages/qutebrowser/app.py", line 508 in __init__
  File "/nix/store/3fvywg6zzkbp1kcjy0zxkx4yllr9d9xk-qutebrowser-1.13.1/lib/python3.8/site-packages/qutebrowser/app.py", line 92 in run
  File "/nix/store/3fvywg6zzkbp1kcjy0zxkx4yllr9d9xk-qutebrowser-1.13.1/lib/python3.8/site-packages/qutebrowser/qutebrowser.py", line 202 in main
  File "/nix/store/3fvywg6zzkbp1kcjy0zxkx4yllr9d9xk-qutebrowser-1.13.1/bin/.qutebrowser-wrapped", line 9 in <module>
Aborted (core dumped)
Things done

This is a backport of #98197. I tested that this makes qutebrowser work again for me, but nothing more.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

fixes c88f3ad, which resulted in
qt 5.15 being used in pythonPackages, despite 5.14 being
declared, and adapts qutebrowser accordingly.

'callPackage { pkgs = pkgs // { … }; }' does not work, because
it does not take into account the recursive evaluation of nixpkgs:

`pkgs/development/interpreters/python/default.nix` calls
`pkgs/top-level/python-packages.nix` with `callPackage`.
Thus, even if the former gets passed the updated `pkgs`,
the latter always gets passed `pkgs.pkgs`.

For the change in the qt5 version to apply consistently, 'pkgs.extend'
must be used.

qutebrowser only used the right qt5 version (5.15) because all
pythonPackages used it anyway.

(cherry picked from commit 626ce32)
@woffs
Copy link
Contributor

woffs commented Sep 27, 2020

Applying this to release-20.09 results in a qutebrowser with qt-5.15 on my machine. Shouldn't this rather result in qutebrowser with qt-5.14?!

@erictapen
Copy link
Member Author

Mh, can confirm that qutebrowser shows Qt version 5.15.0. But how is this a bad thing?
Sorry for being naive, I really didn't look too much into this issue besides noting that it fixed my browser.

@FRidh FRidh merged commit 54ef32d into NixOS:release-20.09 Sep 27, 2020
@woffs
Copy link
Contributor

woffs commented Sep 27, 2020

qutebrowser has issues with 5.15 and to have a 5.15 qutebrowser you can simply use libsForQt5.callPackage without the python part of that patch. I do not understand fully what's happening.

@FRidh
Copy link
Member

FRidh commented Sep 27, 2020

see #97586

@woffs
Copy link
Contributor

woffs commented Sep 27, 2020

Ok. I trust you.

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

4 participants