om init FLAKE_URL -o OUTPUT_DIR on existing OUTPUT_DIR
#446
shivaraj-bh
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current behaviour is to fail if
OUTPUT_DIRexists. But there can be cases where initialising templates in existing project folders can be useful, for example if one wants to initialise only the.nixfiles from https://github.com/srid/rust-nix-template in their existing project (The existing template only supports initialising entirerust-nix-templatesource, but there can be a filtered version for.nixfiles). The only way to do this now, on existing projects, is to manually copy-paste (and modify).nixfiles from one of the examples.Not relevant (low-level rust-nix-template detail):
There is also the problem that
rust-nix-template’s nix modules will not just work-out-of-the-box on all rust projects. Perhaps theom.templates.nix-only(to be implemented conditional to the above proposal getting accepted) can support param to accept a list of crate names to initialise pre-cratecrate.nixfiles for.Note: This would still not guarantee to work-out-of-the-box because there can be non-rust library dependencies that crates can depend on; which must be manually added (for example: openssl in omnix).
Beta Was this translation helpful? Give feedback.
All reactions