flipperzero-firmware
flipperzero-firmware copied to clipboard
Add Nix expressions to build firmware with Nix
What's new
Nix is distro & language agnostic package manager that can also be seen as a meta build system. This can be used to build on any Linux distro as long as the Nix package manager is installed, and possibly also on MacOS though I haven't tested this myself.
This is intended to be used either purely for building the firmware. Building like this runs the build inside a sandbox.
-
$ nix-build ./.
Or interactively using nix-shell:
-
$ nix-shell
-
$ ./fbt firmware_flash
Verification
- Run above steps.
Checklist (For Reviewer)
- [ ] PR has description of feature/bug or link to Confluence/Jira task
- [ ] Description contains actions to verify feature/bugfix
- [ ] I've built this code, uploaded it to the device and verified feature/bugfix
Marking as draft since it's blocked by https://github.com/flipperdevices/flipperzero-firmware/pull/1419
Hi,
Thanks for contribution, but I'm not sure that we ready to include it:
- We have some specific toolchain requirements and we don't support building with 3rd party toolchains, so we are not ready to support one more build system that doesn't cover all our target platforms and requires another set of dependencies
- As for version from environment it looks good though we don't pack source packages, that part we'll merge
@skotopes haha nix community go brrr
Just want to confirm that this still works on Apple M1 Macbooks, and lets me build this firmware without the need to install anything with homebrew. Thanks @adisbladis!