5 ms·
Nix definitely does not allow most things to be built offline (at least in the way Debian means it). With Nix, any fetcher will download the source. It does s
by aidenn0 10mo ago
Nix definitely does not allow most things to be built offline (at least in the way Debian means it).
With Nix, any fetcher will download the source. It does so in a way that guarantees the shasum of what is fetched is identical, and if you already have something in the nix store with that shasum, it won't have to fetch it.
However, with just a mirror of the debian source tree, you can build everything without hitting the internet. This is assuredly not true with just a mirror of nixpkgs.
- MarsIronPI 10mo ago> With Nix, any fetcher will download the source. OK, I see how the Debian idea differs from the Portage/Nix/etc. idea. For Portage and Nix it is enough that the build proper be offline, but the source code is fetched at the beginning of the package build. Not only do I find this sufficient, I prefer it because IMO it makes the package easier to work with (since you're only wrangling the packaging code, not upstream's).
- NewJazz 10mo agoThere are probably still ways to maintain a source archive with a ports system. Just analyze the sources used by builds, create a mirror, and redirect fetches to use the mirror. It's not that crazy. The packaging would still be a separate affair.
- sestep 10mo agoThis is exactly what Nix does, if I understand correctly: the "mirror" is cache.nixos.org as mentioned in XorNot's reply to the same parent post.
- aidenn0 10mo agoI'm about 80% certain that cache.nixos.org caches the results of the builds, not the input sources.
- MarsIronPI 10mo agoI think it does both, at least for some sources. After all, sources are derivations too.
- sestep 10mo agoThis is correct; in Nix lingo these are referred to as "fixed output derivations". For some other interesting context, see this Nix forum post from last year in which they discussed deleting some stuff from cache.nixos.org to save money, but were clear that they'd keep all fixed output derivations and only delete other things that aren't derivable from those: https://discourse.nixos.org/t/upcoming-garbage-collection-for-cache-nixos-org/39078 https://discourse.nixos.org/t/upcoming-garbage-collection-fo...