Follow

Question to / crowd.
Suppose I have a 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% , it still works, even though all the libraries that it depend on are not maintained.

It still fetches snapshots from , 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 flake persist?

gist.github.com/cognivore/db45

cc: @solene

@jonn Fork the source repos of the dependencies and point to them in your flake?

@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 repo to be around in a decade, to be around in a decade *and* the sources. Is there maybe a way to pin the nixpkgs source tree commit in this line: gist.github.com/cognivore/db45 ?

@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, runtime will try to evaluate *an* expression from the input (in our case, presumably, `main` branch of ); fail, because it's no longer there; crash.

@raito @abnv and/or contribute to! This project sounds amazing!

@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?

Right now, the Marsnix script assumes Nixpkgs is what you want to archive. But the logic of what it does is very simple and it can be modified to work just on a drvPath. https://github.com/nix-how/marsnix/blob/master/pkgs/marsnix/default.nix
Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.