summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-01-26 20:12:52 +0000
committerAlyssa Ross <hi@alyssa.is>2023-01-28 21:08:50 +0000
commitb682fef8e96996812fd95fe033b58cf4545e2a70 (patch)
tree0a09242854849cf4dfa3e64273cb479101dd3ef9 /pkgs/development/python-modules/rangehttpserver/default.nix
parent02ee33a5c177334f1cc7c2d5573babf5e7d70d8f (diff)
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.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver/default.nix')
0 files changed, 0 insertions, 0 deletions