Commit graph

2 commits

Author SHA1 Message Date
Côme VINCENT
bd90132cd6 tools/nix: split flake into root and Documentation
Root flake now only contains dependencies needed for building the NuttX
firmware. The Documentation flake contains the dependencies needed for
running `make html`.

Updated the documentation accordingly.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-08-12 20:17:23 +08:00
Côme VINCENT
92be21982d tools/nix: Add Nix flake for reproducible dev environment
This commit introduces a Nix flake (flake.nix and flake.lock) to provide
a reproducible development shell for NuttX using Nix and flakes.

- Adds a devShell with all required build tools and dependencies for NuttX,
  including CMake, Ninja, GNU Make, clang-tools, ARM toolchain, and other
  utilities (automake, bison, flex, genromfs, gettext, gperf, kconfig-frontends,
  libelf, expat, gmp, isl, libmpc, mpfr, ncurses, zlib, kconfiglib).
- Uses flake-utils to support multiple platforms.
- Sets up a shell hook to enable CMake compile commands and provide a welcome
  message.
- Based on nixpkgs `nixos-unstable` for up-to-date packages.

Purpose:
- Simplifies onboarding and ensures a consistent build environment across
  contributors.
- Reduces "works on my machine" issues by pinning dependencies.

Tested by running `nix develop` and building NuttX on x86_64-linux.

No impact on runtime or target builds; this only affects developer tooling.

For more details, see the new flake.nix file.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-07-26 20:55:29 +08:00