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
stdenv: set SOURCE_DATE_EPOCH to a value python supports #89794
Conversation
in nix-shell this value breaks the build because python's packaging refuses to build timestamps that date before 1980.
If there are no objections I would also fix the python docs before merging this. |
This is handled for python packages using the |
I think this has pretty big ramifications from a philosophical / purist perspective. cc @edolstra EDIT: also, this opens of the door to having to support any new archive format which may or may not support a given date range. |
Well. it is sort of annoying so and it is not added when you add python to buildInputs. |
I don't get this point. Please backup with technical reasons. |
I don't see any reason not to change it again if we have good reason to. It does not comes with any cost if time it with another stdenv rebuild. |
I'm definitely not the best to comment on this. cc @FRidh Trust me, I think it's annoying as well. I've just gotten used to including the hook to all my environments. |
See earlier #60446 |
I don't agree that we have to switch nix store dates. In a nix-shell it is enough to have SOURCE_DATE_EPOCH with the value given here set for python wheels to be build successfully. If that is all arguments against changing this value I would like to proceed to merge it. |
If Python packaging using Nix needs it, then it needs to propagate the hook. Just make sure you propagate from the right tools. |
So should we added it to python's setup hook? |
The interpreter does not do anything with wheels. The logical place would be the tools consuming or producing the wheels. When again does the issue occur, when building or installing wheels? If I am correct it is when building wheels. Thus the PEP 517 backends should propagate the hook. |
Still this is bad UX. If someone includes |
That's just because you use |
|
I don't know if it can or cannot be changed, and suggest you ask around further in the community, considering this is the |
I agree with @Mic92. The python issue is a major annoyance with a non-trivial fix. We can work around it with little to no cost. The fix isn't perfect, but strictly better than the status quo. |
in nix-shell this value breaks the build because python's
packaging refuses to build timestamps that date before 1980.
Motivation for this change
I am surprised this has been not done before... Tell me if I miss anything here.
cc @FRidh @jonringer
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)