leoafarias / fvm

Flutter Version Management: A simple CLI to manage Flutter SDK versions.
https://fvm.app
MIT License
4.73k stars 233 forks source link

feature: add Nix Flake support #775

Open mikeborodin opened 2 months ago

mikeborodin commented 2 months ago

This PR adds nix "flake" configuration so that Nix users can easily use fvm We use devbox which is an abstraction on top of nix to declaratively manage project dependencies. With this adding fvm to the project dev environment is as easy as running devbox add github:leoafarias/fvm This will result in the "flake" added to your devbox.json (where all the dependencies are declared):

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
  "packages": [
    "github:leoafarias/fvm",
  ],
  "shell": {
    "init_hook": [
       "fvm flutter doctor"
    ]
  }
}

The benefit is this file is checked into the source control and everyone on the team will have fvm installed once they are in this dev environment :)

Testing steps for this pr

# install devbox
devbox init
devbox add github:mikeborodin/fvm/1eccdd2b3235b5455c613241f9ae78c7f1de2ae6
devbox shell
fvm list

This is my first PR here so let me know if I missed something 😊

thanks

vercel[bot] commented 2 months ago

@mikeborodin is attempting to deploy a commit to the FlutterTools Team on Vercel.

A member of the Team first needs to authorize it.