Skip to content

Commit d639778

Browse files
committed
fix passing qt5 version to pythonInterpreters
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.
1 parent 2a14d21 commit d639778

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

pkgs/development/interpreters/python/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, lib }:
1+
{ pkgs }:
22

33
with pkgs;
44

pkgs/top-level/all-packages.nix

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10160,10 +10160,10 @@ in
1016010160

1016110161
pythonInterpreters = callPackage ./../development/interpreters/python {
1016210162
# Overrides that apply to all Python interpreters
10163-
pkgs = pkgs // {
10163+
pkgs = pkgs.extend (pkgs: _: {
1016410164
qt5 = pkgs.qt514;
1016510165
libsForQt5 = pkgs.libsForQt514;
10166-
};
10166+
});
1016710167
};
1016810168
inherit (pythonInterpreters) python27 python36 python37 python38 python39 python3Minimal pypy27 pypy36;
1016910169

@@ -22836,18 +22836,10 @@ in
2283622836
quodlibet-xine-full = quodlibet-full.override { xineBackend = true; tag = "-xine-full"; };
2283722837

2283822838
qutebrowser = let
22839-
libsForQt5 = libsForQt515;
22840-
qt5 = qt515;
22841-
python = python3.override {
22842-
packageOverrides = self: super: {
22843-
pkgs = pkgs // {
22844-
inherit libsForQt5 qt5;
22845-
};
22846-
};
22847-
self = python3;
22848-
};
22839+
pythonI = pkgs.pythonInterpreters.override { inherit pkgs; };
22840+
verString = lib.concatStrings (lib.take 2 (lib.splitVersion pkgs.python3.version));
2284922841
in libsForQt5.callPackage ../applications/networking/browsers/qutebrowser {
22850-
python3 = python;
22842+
python3 = pythonI."python${verString}";
2285122843
};
2285222844

2285322845
rabbitvcs = callPackage ../applications/version-management/rabbitvcs {};

0 commit comments

Comments
 (0)