livekit-cli
livekit-cli copied to clipboard
flake: init
Adds a Nix flake for development and building, which replicates the functionality of the Makefile. The devShell provides the necessary tools to immediately hack on the project, namely Go and an LSP for editor integration.
Rationales for this:
- Nix is a very powerful package manager and build system. Using it foregoes the need for keeping track of packages you need for development.
- NixOS doesn't really do the
curl|shthing. This would allow users of NixOS to use livekit-cli without adding it to nixpkgs, by utilizing flakes.
Usage:
nix buildto build a binary and write it toresult/bin/livekit-clinix runto immediately build & run the CLInix developto enter a devShell with tools in $PATH
Caveats:
- Uses its own independent version instead of reading version.go. This could be fixed by inferring the version from the git tag and using
-X ...=$(git describe --tags --long --always)(see this example) - gomod2nix.toml needs to be updated every time go.mod is touched: e.g. on module add or update.