-
Notifications
You must be signed in to change notification settings - Fork 76
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
Can't override python3 in an overlay #413
Comments
I thought the following would work too but it fails to take my modifications into account. python3 = super.python3 // {
pkgs = super.python3.pkgs.overrideScope(pyFinal: pyPrev: {
mypkg = pyPrev.mypkg.overrideAttrs ....
});
}; EDIT: In this case my modifications are available under |
Okay I can work around the package issue by using pythonPackagesExtensions = super.pythonPackagesExtensions ++ [
(pyFinal: pyPrev: {
pykdl = pyPrev.pykdl.overrideAttrs({ cmakeFlags ? [], ... }: {
cmakeFlags = cmakeFlags ++ [ "-DPYTHON_EXECUTABLE=${lib.getExe self.python3.pythonOnBuildForHost}" "-DWHATEVER=1" ];
});
})
]; This allows my version of |
@lopsided98 do you have any suggestions? This is a blocker for me. |
I had this same issue, and ended up just copying the pythonOverridesFor function into my flake and applying it there too. Not the best solution, but the function is short enough I did it anyways. # from distros/distro-overlay.nix
pythonOverridesFor = with self.lib; prevPython: prevPython // {
pkgs = prevPython.pkgs.overrideScope (pyFinal: pyPrev: {
wxPython = pyFinal.wxPython_4_2;
empy = pyFinal.empy_3;
}; then apply with this in your overlay. python3 = pythonOverridesFor super.python3; |
Hm. Then you add your package overrides in the implementation of Edit: this approach doesn't seem to work for me. I'm still missing |
I switched to |
I can't seem to override
python3
anymore. Previously I had an overlay that did the following:to override some packages for cross compilation. This pattern now fails. I have a reproducer here: https://github.com/kjeremy/nix-ros-overlay-python-fail.
As an aside (hint?) in my actual project it complains about
empy_3
missing.The text was updated successfully, but these errors were encountered: