Skip to content

Commit

Permalink
python: fix full builds by referring to the correct interpreter
Browse files Browse the repository at this point in the history
The package set is an attribute of the interpreter. The function to
build an environment (`buildEnv`/`withPackages`) is part of the
interpreter. The interpreter is passed to itself, and needs to be
updated when overridden.

For cross-compilation we splice the package set, and for that the
various `build/host` interpreters and sets need to be available. We
select these currently through `pkgs.${pythonAttr}`. The `pythonAttr`
attribute was not fixed for `pythonFull`.

NixOS/rfcs#83
NixOS#104201

We need a better solution for this because this is very brittle.
  • Loading branch information
FRidh committed Feb 27, 2021
1 parent b5702fd commit f507dd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/development/interpreters/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ in {
# Minimal versions of Python (built without optional dependencies)
python3Minimal = (python38.override {
self = python3Minimal;
pythonAttr = "python3Minimal";
# strip down that python version as much as possible
openssl = null;
readline = null;
Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11431,38 +11431,46 @@ in
# These are for compatibility and should not be used inside Nixpkgs.
pythonFull = python.override {
self = pythonFull;
pythonAttr = "pythonFull";
x11Support = true;
};
python2Full = python2.override {
self = python2Full;
pythonAttr = "python2Full";
x11Support = true;
};
python27Full = python27.override {
self = python27Full;
pythonAttr = "python27Full";
x11Support = true;
};
python3Full = python3.override {
self = python3Full;
pythonAttr = "python3Full";
bluezSupport = true;
x11Support = true;
};
python36Full = python36.override {
self = python36Full;
pythonAttr = "python36Full";
bluezSupport = true;
x11Support = true;
};
python37Full = python37.override {
self = python37Full;
pythonAttr = "python37Full";
bluezSupport = true;
x11Support = true;
};
python38Full = python38.override {
self = python38Full;
pythonAttr = "python38Full";
bluezSupport = true;
x11Support = true;
};
python39Full = python39.override {
self = python39Full;
pythonAttr = "python39Full";
bluezSupport = true;
x11Support = true;
};
Expand Down

0 comments on commit f507dd5

Please sign in to comment.