Local flake development

Hello. What do you typical use for vendoring dependencies when you are developing a flake along with its dependencies (both flake and non-flake) and dependencies for those dependencies etc…

How do you temporarily and transitively redirect all inputs to local folders?
Right now I’m editing lockfiles via a python script which is changing locked references to local ones.

Btw. nix flake update/lock --update-input x y is unusable because lockfiles created in that way have also original references changed and any subsequent Nix command wants to change them back unless you specify --no-update-lock-file which causes a failure.

For example Rust’s cargo build system has a dedicated command cargo vendor which clones all dependencies and setup local overrides (transitively). I’m sorely missing such functionality in Nix but perhaps I just haven’t found the right command.

--override-input on individual nix commands does the trick for me when I want to use local clones of my flakes. A wrapper around nix that just chucks a bunch of --override-inputs into every subcommand would probably do the trick if you really have a lot of these repositories.

If that’s still painful, might be worth seeing about opening an upstream issue. The nix 3.0 CLI isn’t finished yet, after all :slight_smile: