393ce3c0ed
lua_app.cpp had grown to 701 lines holding every binding, the module loader and the app lifecycle, so new bindings landed wherever the cursor was. Each Lua table now has its own file under bindings/, and the app is recovered from the lua_State's extra space instead of a file-static, so a second state cannot reach the wrong app. Three tests each redeclared the binding surface, which broke twice this session when a binding changed; test/fake_device.lua is now the single stub. `make test` runs all four suites and pins Lua 5.4, matching the vendored interpreter rather than the 5.2 the tests had silently been using.
40 lines
856 B
Nix
40 lines
856 B
Nix
{
|
|
description = "ESP32-32E 4.0\" LCD Lua app firmware";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{ nixpkgs, ... }:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
in
|
|
{
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
platformio-core
|
|
gnumake
|
|
# Host tests run on the same Lua version the firmware vendors.
|
|
lua5_4
|
|
gcc
|
|
];
|
|
shellHook = ''
|
|
export PLATFORMIO_CORE_DIR="$PWD/.cache/platformio"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|