fix passing qt5 version to pythonInterpreters

fixes c88f3adb17, 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.
This commit is contained in:
Johannes Rosenberger 2020-09-18 00:45:31 +02:00 committed by Frederik Rietdijk
parent e9364d1737
commit 7abb57c7b5
2 changed files with 13 additions and 18 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, lib }:
{ pkgs }:
with pkgs;

View file

@ -10217,10 +10217,10 @@ in
pythonInterpreters = callPackage ./../development/interpreters/python {
# Overrides that apply to all Python interpreters
pkgs = pkgs // {
qt5 = pkgs.qt514;
libsForQt5 = pkgs.libsForQt514;
};
pkgs = pkgs.extend (final: _: {
qt5 = final.qt514;
libsForQt5 = final.libsForQt514;
});
};
inherit (pythonInterpreters) python27 python36 python37 python38 python39 python3Minimal pypy27 pypy36;
@ -22956,19 +22956,14 @@ in
quodlibet-xine-full = quodlibet-full.override { xineBackend = true; tag = "-xine-full"; };
qutebrowser = let
libsForQt5 = libsForQt515;
qt5 = qt515;
python = python3.override {
packageOverrides = self: super: {
pkgs = pkgs // {
inherit libsForQt5 qt5;
};
};
self = python3;
};
in libsForQt5.callPackage ../applications/networking/browsers/qutebrowser {
python3 = python;
};
pkgs_ = pkgs.extend(_: prev: {
pythonInterpreters = prev.pythonInterpreters.override(oldAttrs: {
pkgs = oldAttrs.pkgs.extend(_: _: {
inherit (pkgs) qt5 libsForQt5;
});
});
});
in pkgs_.libsForQt5.callPackage ../applications/networking/browsers/qutebrowser { };
rabbitvcs = callPackage ../applications/version-management/rabbitvcs {};