Open ScratchCat458 opened 2 months ago
I personally cannot get the point of flake template until it gets anything more than a fancier cp -r
. It does not even support configuring name, let alone custom checks and file appending. Guessing user's demand is hard, even providing multiple templates cannot make up the inability of cp -r
.
.gitignore
exists and target
ignored?flake.nix
and/or shell.nix
already exists? Which approach does the user prefer? I'm a fan of flakes, but I still find shell.nix
more light-weight and more convenient for simple cases. It's fast and does not copy the whole directory into nix store after each modification.aarch64-linux
and riscv64-linux
may not be just a string change. (Through, in most cases, they are; unless the user is not in the set of "most cases")I prefer adding more examples if user want something for reference, than flake templates for directly cp
. Or maybe you have better knowledge on "what a most useful template for most users is like"?
Nix's templates are somewhat limited in what they can provide due to a lack of granularity. There has been some ideation, but its mostly a dead end. I agree that Crane is probably the best option for most users to setup shells alongside packaging.
There is no real consistency across the templates of different repos, some initialise the entire project, others only create the flake. For most users, a nix flake init
is usually desired as a replacement for a quickstart. I can definitely see the difficulty in providing a template that satisfies most use cases for a lower-level tool like rust-overlay, especially after considering cross compilation.
Sorry that I can't really provide a satisfying answer.
In response to issue #119.
Adds a new example to the
examples
folder that provides a flake with a dev shell with the default stable toolchain and allows use on multiple systems via flake utils. Based on this README example.Template can be initialised with:
I'm considering creating another template that uses a
rust-toolchain.toml
instead, but I will save that for another pull request.