DeterminateSystems / fh

The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.
https://flakehub.com
Apache License 2.0
122 stars 8 forks source link

Add support for `flake-compat` to `fh init` #57

Closed lucperkins closed 1 year ago

lucperkins commented 1 year ago

This PR adds support for flake-compat to the fh init command. If you say yes to the prompt, you get a default.nix, a shell.nix, and a flake-compat input in your flake.nix.

I've tested that this works using these steps:

# Empty project

fh init

# Say "yes" to prompt re: Nix users who don't use flakes

nix-shell

[nix-shell:~/example-flake]$ which curl
/nix/store/kmiapnigv92jwhpzqk2w9mjk0y8y8s6b-curl-8.1.1-bin/bin/curl
grahamc commented 1 year ago

Looking good, :shipit: when ready!