nmattia/niv

[feature] `init` option to create a tiny shell.nix skeleton

Open

#316 opened on Apr 12, 2021

View on GitHub
 (2 comments) (2 reactions) (0 assignees)Haskell (77 forks)batch import
enhancementgood first issue

Repository metrics

Stars
 (1,829 stars)
PR merge metrics
 (Avg merge 2d 21h) (1 merged PR in 30d)

Description

Just a little suggestion here:

I (and at least one of my colleagues) often create ad-hoc nix shells for existing and new projects, and would love it if we could effectively bootstrap a little nix project environment that uses niv using niv init --shell or similar. If --shell is provided and there is no existing shell.nix, a tiny shell.nix template that gets its packages from niv's nixpkgs would be created.

I know this is probably somewhat orthogonal to the tool's goals, and of course what constitutes a "good" shell.nix is a matter of opinion, but I think this would be a real timesaver for many users.

Thanks again for niv!

Contributor guide