Open trofi opened 2 months ago
As long as we don't recurse into these package sets we cannot guarantee things won't break all the time. And for that we'd need someone to care about pypy a lot.
FWIW I think pythonPackages
is in roughly the same boat:
$ NIXPKGS_ALLOW_INSECURE=1 nix-instantiate -A pythonPackages.incremental
error:
… while evaluating the attribute 'drvPath'
at /home/slyfox/dev/git/nixpkgs-master/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
… while evaluating the attribute 'drvPath'
at /home/slyfox/dev/git/nixpkgs-master/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: cannot coerce a set to a string: { scripts = «thunk»; }
Quoting the solution from https://github.com/NixOS/nixpkgs/pull/338559#issuecomment-2323064175:
You can fix
buildPythonPackage
instead.You'd have to replicate b9138b7c072f5 in
pkgs/development/interpreters/python/python2/mk-python-derivation.nix
.
Oops, didn't see that this was included in the OP.
A few more fresh eval regressions with the same cause:
$ nix-instantiate -A pypy27Packages
$ nix-instantiate -A pypy27Packages.pytest_7
Affected packages are at least:
Changes like https://github.com/NixOS/nixpkgs/pull/335112 broke the evaluation for
pythonPackages
. Example failure:This is a "syntactic" error of a non-catchable exception.
Note that this specific package used to fail with a catchable excaption:
Expected behavior
The exception should be catchable and report unsupported interpreter.
Additional context
My naive attempts to move attrsets out of the environment were rejected in:
And the suggestion was: https://github.com/NixOS/nixpkgs/pull/338559#issuecomment-2323064175
""" You can fix buildPythonPackage instead.
You'd have to replicate https://github.com/NixOS/nixpkgs/commit/b9138b7c072f5 in pkgs/development/interpreters/python/python2/mk-python-derivation.nix. """
I don't think I can pull it out without investing some time to understand how python wraps and filters attributes just to restore the evaluation of packages.
Notify maintainers
Maybe python team: @mweinelt @natsukium
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.