Skip to content

Comments

python: fix passing wrong qt5 version to pythonInterpreters#98185

Closed
jorsn wants to merge 1 commit intoNixOS:masterfrom
jorsn:pythonPackages
Closed

python: fix passing wrong qt5 version to pythonInterpreters#98185
jorsn wants to merge 1 commit intoNixOS:masterfrom
jorsn:pythonPackages

Conversation

@jorsn
Copy link
Member

@jorsn jorsn commented Sep 17, 2020

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

Motivation for this change

'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.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built Evaluated and traced 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.
@jorsn jorsn requested a review from FRidh as a code owner September 17, 2020 23:07
@jorsn jorsn added 0.kind: bug Something is broken 6.topic: python Python is a high-level, general-purpose programming language. labels Sep 17, 2020
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Sep 17, 2020
@FRidh FRidh self-assigned this Sep 18, 2020
@FRidh
Copy link
Member

FRidh commented Sep 18, 2020

Thank you, you're completely right! I've opened a new PR taking your commit with some changes #98197.

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

Labels

0.kind: bug Something is broken 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants