Hacker News new | past | comments | ask | show | jobs | submit login

> The image age might look weird at first, but it’s part of the reproducibility Nix offers. The date an image was built is something that can change with time and is actually a part of the resulting file. This means that an image built one second after another has a different cryptographic hash. It helpfully pins all images to Unix timestamp 0, which just happens to be about 50 years ago.

This doesn’t mean builds done by Nix are bit-for-bit reproducible by default, does it?

There are a lot of other ways to introduce non-determinism in builds, like rand() or network requests (which I think could only be eliminated in a generic way by literally emulating the CPU of the machine doing the build and not allowing external communication?)




It provides the hash of files as a method of verifying the input identity. As long as the build file is pure function of build tools (gcc, make, etc), and the build tools themselves are deterministic, the build outputs should be reproducible. Though I've never seen anything like `-frandom-seed=<input-file-name>` in build files. I think bit-by-bit reproduciblity is one problem tackled by guix.


I think bit-by-bit reproduciblity is one problem tackled by guix.

I think the Nix folks are also interested to some extend. Currently, almost 99% of the paths in the minimum installation image are reproducible:

https://r13y.com/


The nix by default makes builds in a sandbox. It is purposefully making certain operations unavailable (local home directory, local configuration, network access etc). I don't think it prevents Rand(), but that's not as common.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: