News for hackers. Stuff that matters.
Re:Single-file scripts that download their dependencies by ewuhic on Sunday January 15, 2023 @09:43AM (#34389738)
What would be an example filetree structure for the nix run to match #!-interpreter via flake? Cannot all the definitions fit into a single "flake.nix"? Also, would it be possible to use some other name than "flake.nix"?
Re:Single-file scripts that download their dependencies by mananaysiempre on Sunday January 15, 2023 @10:35AM (#34390122)
As far as I know, flake.nix is hardcoded, so you’re going to use a separate directory for every script anyway. And then there’s flake.lock, which you have to go out of your way to avoid creating, and you’ll be spammed with obnoxious warnings if you still do.

So would you want to fit everything into just flake.nix? I don’t see why. Could you? Yeah, sure: http://ix.io/4ll5 for a single shell script, for example.