nixpkgs/pkgs/development/interpreters/python
Alyssa Ross b682fef8e9 python3.pkgs: fix splice through unsupported hosts
Previously, unless unsupported platforms were allowed, the following
would fail to evaluate (from an "x86_64-linux" system):

    pkgsCross.x86_64-freebsd.__splicedPackages.docutils.__spliced.buildHost

It shouldn't have, because the buildHost package ends up being for
Linux.  This broke evaluation of e.g. pkgsCross.x86_64-freebsd.libdrm,
because it has docutils in nativeBuildInputs.  mkDerivation would try
to go through __spliced.buildHost on docutils to get to the Linux
version, but the check in ensurePythonModules would kick in first,
triggering the meta check because of the equality check in the
implementation of hasPythonModule, which would fail because Python is
not marked as supported on FreeBSD in Nixpkgs at the moment.  Thus,
even though they're not supposed to be, the meta checks would be
triggered even though the only attribute being accessed on the
unsupported derivation was __spliced.

We can fix this by using the same mechanism used to implement the meta
checks themselves: lib.extendDerivation.  Now, attempting to access
drvPath or outPath on an attribute that fails the validity check will
produce the same error as before, but other accesses will be allowed
through, fixing splicing.

I've tested evaluation of packages that pass and fail the validity
check, and confirmed that the behaviour is still correct.
2023-01-28 21:08:50 +00:00
..
catch_conflicts
conda
cpython treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
hooks Merge pull request #208962 from KAction/patch/v1/python3.pkgs.sphinxHook 2023-01-04 02:38:53 +01:00
manylinux manylinux: use libxcrypt for libcrypt.so.1 2022-12-01 14:09:42 +01:00
pypy pypy39: fix pypy3 symlink 2023-01-08 19:34:59 +00:00
rustpython treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
tests
update-python-libraries treewide: fix typos 2022-12-17 19:39:44 -05:00
default.nix python3.pkgs: fix splice through unsupported hosts 2023-01-28 21:08:50 +00:00
mk-python-derivation.nix buildPythonPackage: support nativeCheckInputs 2023-01-21 16:42:09 +01:00
python-packages-base.nix fetchPypi: move to top level 2023-01-21 08:21:33 +01:00
run_setup.py
setup-hook.nix treewide: fix some core package structuredAttrs 2022-12-08 21:05:28 +02:00
setup-hook.sh
sitecustomize.py
tests.nix pythonPackagesExtensions: override all Python package sets at once 2022-08-06 09:39:39 +02:00
with-packages.nix
wrap-python.nix treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
wrap.sh
wrapper.nix python-wrapper: use makeBinaryWrapper 2022-04-20 21:59:47 +02:00