3 ms·
Can you recommend tools you prefer/use for achieving reproducibility/determinism?
by womfoo 2y ago
Can you recommend tools you prefer/use for achieving reproducibility/determinism?
- im3w1l 2y agoI enjoyed thinking about the "how would I do it differently question", note would, as I have never actually tried it. Maybe something like this? All packages are defined as a tuple (dependencies, dev dependencies, base image, command list, file list). Builds are done by loading the base image into a virtual machine, copying the dev dependencies into the vm, running the commands, and then pulling the listed files out into the host. All packages of a given OS edition would use the same base image, I suppose. If a user wants to configure a package it will be done by putting a patch file in his configuration directory. The patch is applied to the built files.
- viraptor 2y agoYou're describing nixpkgs with an external builder in a VM. That's exactly what it would do. And that tuple is what nixpkgs packages really are (with some macros on top, but you're not forced to use them).
- im3w1l 2y agoMy impression of configuration in nix is that a lot of configuration that in any other distro would be handled by changing some /etc/file is instead done in a completely separate way by editing some nix file. So that's one user-visible way it differs from what I mentioned of using a patch for the /etc/file. Some simple example I found just now: https://unix.stackexchange.com/questions/489509/how-do-i-modify-my-hosts-file-in-nixos https://unix.stackexchange.com/questions/489509/how-do-i-mod...
- viraptor 2y agoThere are patches which need to live in the repo by default anyway, so that's already supported, just not as random /etc location. https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/aw/aws-gate https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/aw...