News for hackers. Stuff that matters.
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by dd_ on Monday January 23, 2023 @01:14PM (#34492653)
You're not wrong overall, but your example is. In the build environment, the current time is set to the epoch which removes that variability.

An upcoming feature of nix is content addressed builds which use the output hashes to determine the store path. This should make it much more transparent which builds are reproducible and which are not.

Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by Filligree on Monday January 23, 2023 @01:30PM (#34492918)
> In the build environment, the current time is set to the epoch which removes that variability.

The amount of time per build can vary. Embedded timestamps will all be in January 1970, but even a single second difference means the binaries are no longer bit for bit identical -- and that assumes the embedded timestamp isn't microseconds.

Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by infogulch on Monday January 23, 2023 @02:19PM (#34493579)
I think you're assuming that the timestamp only starts at the epoch and still advances in real time, which is not necessarily true.
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by Filligree on Monday January 23, 2023 @02:23PM (#34493637)
If it didn't advance, that would cause trouble for some build systems. So yes, I'm assuming it does.