walnux/tools/nix/flake.nix
Côme VINCENT c36d067603 tools/nix: move nix flakes to tools/
This commit moves the flake.lock and flake.nix files from root and
Documentation/ to the tools/ directory, according to @anchao's
suggestion in PR #16763.
Updates documentation to reflect this change.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-08-28 10:04:01 +08:00

64 lines
1.4 KiB
Nix

{
description = "NuttX : devShell flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
documentation.url = "path:./doc/";
};
outputs =
{
self,
nixpkgs,
flake-utils,
documentation,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
# Default devShell
devShells.default = pkgs.mkShell {
buildInputs = [
# Build tools
pkgs.cmake
pkgs.ninja
pkgs.gnumake
pkgs.clang-tools
# ARM toolchain
pkgs.gcc-arm-embedded
# NuttX dependencies
pkgs.automake
pkgs.bison
pkgs.flex
pkgs.genromfs
pkgs.gettext
pkgs.gperf
pkgs.kconfig-frontends
pkgs.libelf
pkgs.expat.dev
pkgs.gmp.dev
pkgs.isl
pkgs.libmpc
pkgs.mpfr.dev
pkgs.ncurses.dev
pkgs.zlib
pkgs.python313Packages.kconfiglib
];
shellHook = ''
export CMAKE_EXPORT_COMPILE_COMMANDS=ON
echo "Welcome to NuttX devShell"
'';
};
# Documentation devShell
devShells.docs = documentation.devShells.${system}.default;
}
);
}