Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python checks no longer work #138

Open
jtojnar opened this issue Mar 9, 2023 · 5 comments
Open

Python checks no longer work #138

jtojnar opened this issue Mar 9, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@jtojnar
Copy link
Owner

jtojnar commented Mar 9, 2023

The overlay produced by checkBuildPythonPackageFor no longer appears to override buildPythonPackage:

final:
prev:
let
# Keep in sync with Nixpkgs’s all-packages.nix. Look for `inherit (pythonInterpreters)`.
# No need to include e.g. `python3`, since that is derived from one of the listed.
pythonPackageSetNames = [
"python2"
"python38"
"python39"
"python310"
"python311"
"python312"
"python3Minimal"
"pypy27"
"pypy39"
"pypy38"
"pypy37"
"rustpython"
];
in
lib.genAttrs pythonPackageSetNames (pythonName:
prev.${pythonName}.override (oldOverrides: {
packageOverrides = lib.composeExtensions (oldOverrides.packageOverrides or idOverlay) (final: prev: {
buildPythonPackage = wrapFunctionWithChecks prev.buildPythonPackage check;
});
})
);

And the one from checkFor does not seem to apply to mkDerivation used by buildPythonPackage internally (even though it works for packages using stdenv.mkDerivation directly:

final:
prev:
{
stdenv = prev.stdenv // {
mkDerivation = wrapFunctionWithChecks prev.stdenv.mkDerivation check;
};
};

I bisected the breakage to NixOS/nixpkgs@33d12e5

@jtojnar jtojnar added the bug Something isn't working label Mar 9, 2023
jtojnar added a commit that referenced this issue Mar 9, 2023
Overlays no longer appear to affect `buildPythonPackage` since NixOS/nixpkgs@33d12e5
Disable the positive tests until that is resolved.

See: #138
@AkechiShiro
Copy link

Hi @jtojnar is this still relevant today?

@jtojnar
Copy link
Owner Author

jtojnar commented Sep 9, 2023

@AkechiShiro Yes, I have not found the time to fix this yet.

@AkechiShiro
Copy link

How can I help investigate/fix this, it looks a bit complicated due to the nature of the change that was made upstream ? What do you recommend me to do so I can dig into this and help you maybe get closer to fix it, I don't know if I'll be able to as this is my first contribution to this nix community project.

@jtojnar
Copy link
Owner Author

jtojnar commented Sep 10, 2023

You can clone nixpkgs-hammering and revert bc495ee, and try to make the tests pass by tweaking the overlays.
You can also try to look at NixOS/nixpkgs@33d12e5 and tweak it and try to run tests with the updated Nixpkgs usingnix shell --override-input nixpkgs . ~/Projects/nixpkgs-hammering -c ./run-tests.py

It does not matter if it is your contribution but it will be pretty hard so it depends on how you are proficient with Nix or comfortable reading the overlay and fix-point heavy Nix code for stdenv and Python packaging.

@AkechiShiro
Copy link

Fine, thanks for the detailed instructions @jtojnar, let me take up this challenge, if I fail, I'll only have learned more, no one can fix everything on their first tries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants