-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add support for specifying the build date #6788
Conversation
Why would you want to set a specific build date? |
To have a more deterministic build. On NixOS we generally set the date in the build environment to the start of the unix epoch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually prefer to have the date/build number as additional information of the exact tag/commit because for a given release you might have multiple builds/packaging.
But I am ok to add this if it helps for some platforms.
Should this be |
I have changed the variable name to @jhass's suggestion. I noticed that CircleCI fails on Darwin with this change. Is that expected? Also, do you require a test? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterhoeg thanks. There is no test required for this.
Darwin is failing for unrelated reasons (llvm7 support will fix that).
Currently the compiler gets the compilation date embedded into it - instead allow a date to be specified (would typically be the release date) so that subsequent compilations would not be different.
Further to #3973
Do you still require specs for something this small?
Tangibly, this will be used by NixOS/nixpkgs#47166 instead of the ugly replacement I'm doing over there.