Hacker News new | ask | show | jobs
by Rucadi 790 days ago
This seems to be from 2 years ago, a lot of things could have changed.

He seemed quite opinionated on flakes, but the only bad thing that I can see to flakes is that you cannot pass args to them, for imo no valid reason, you have to use the file+file protocol and update the inputs each time to have a reasonable way to pass parameters...

3 comments

(Tvix developer here) 2 years after, Flakes are still what they are, IMHO, a pile of layering violations.

I do not see a path forward for them in Tvix before we get to fix them layer by layer, which Nix is trying to do (slowly?).

At some point, once we stabilize a bunch of things, I have some plans to do what I call the right design of Flakes, but it does not involve modifying completely the core of the interpreter to leak this implementation detail everywhere, but more make this a library concept.

Most flakes make it a pain to cross-compile, too, especially to platforms other than the "big four" ({aarch64,x86_64}-{linux,macos}), as compared to overlays.

(That said, the tooling around flakes is so much nicer that I still use and recommend them.)

override input works well.

asking nix to accept arbitrary args in flakes like asking to so random patch of rust code during compilation. to patch use cargo patch. that is analogy of flakes, when you thing how flakes make nix statically typed.