Question to #nixos / #nix crowd.
Suppose I have a #flake lock and I want to make sure that the software I wrote will live without maintenance for decades?
I made a system with a lot of arcane dependencies in 2012. But thanks to it being 100% #Erlang, it still works, even though all the libraries that it depend on are not maintained.
It still fetches snapshots from #git, Erlang VM using a specialised tool to install any Erlang VM version and just works!
How do I ensure that the sources that I rely on to evaluate a #nix flake persist?
https://gist.github.com/cognivore/db451216e790dda18e6f787491b00040
cc: @solene
@abnv would forking nixpkgs be enough or do I have to go deeper?
@jonn Depends on how much you trust the dependencies repos to be around after a decade. If you are very paranoid, you can find the closure of your project and fork everything. Nix should be able to build everything from source till the hardware architecture is supported.
@abnv I mean, I trust #nixpkgs repo to be around in a decade, #github to be around in a decade *and* the sources. Is there maybe a way to pin the nixpkgs source tree commit in this line: https://gist.github.com/cognivore/db451216e790dda18e6f787491b00040#file-flake-nix-L3 ?
@jonn That's what flake lock does, right? It pins all dependencies to particular commits.
@abnv one would think, but no.
Suppose an expression for `pkgs.foo` is no longer there.
As far as I can tell from practice, before trying to pin the version of this expression via flake.lock, #flake runtime will try to evaluate *an* expression from the input (in our case, presumably, `main` branch of #nixpkgs); fail, because it's no longer there; crash.
@jonn @abnv you can also trust https://www.softwareheritage.org/ and nixpkgs-swh 🙂
@jonn @solene That's assuming Flakes doesn't change too much as the feature stabilizes. Changes, if any, will be superficial syntax.
I know @matthewcroughan has a source copying solution called marsnix, or is that too much geared towards nixpkgs?
@jonn Fork the source repos of the dependencies and point to them in your flake?