This commit is contained in:
mjallen18
2026-03-16 17:03:19 -05:00
parent 5b3e625335
commit 8c93a6473d
2 changed files with 33 additions and 2 deletions

View File

@@ -9,12 +9,12 @@ with lib;
let
cfg = config.${namespace}.services.home-assistant;
# ESPHome with littlefs-python and pyfatfs added to PYTHONPATH so PlatformIO's
# ESPHome with littlefs-python and fatfs added to PYTHONPATH so PlatformIO's
# espressif32 platform builder can import them (needed for LittleFS/FAT support).
esphomeWithLittlefs = pkgs.esphome.overridePythonAttrs (oldAttrs: {
makeWrapperArgs = (oldAttrs.makeWrapperArgs or [ ]) ++ [
"--prefix PYTHONPATH : ${pkgs.${namespace}.littlefs-python}/${pkgs.python3.sitePackages}"
"--prefix PYTHONPATH : ${pkgs.python3Packages.pyfatfs}/${pkgs.python3.sitePackages}"
"--prefix PYTHONPATH : ${pkgs.${namespace}.fatfs}/${pkgs.python3.sitePackages}"
];
});
in

View File

@@ -0,0 +1,31 @@
{
lib,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "fatfs";
version = "0.1.2";
pyproject = false;
src = python3Packages.fetchPypi {
inherit pname version;
hash = "sha256-VrnL2a2qq/tg9sRTKO+vlvQKMjNT3K2sm/B5UAYdqqA=";
};
build-system = with python3Packages; [
setuptools
cython
];
doCheck = false;
pythonImportsCheck = [ "fatfs" ];
meta = with lib; {
description = "Python bindings for ChaN's FatFS, the generic FAT/exFAT filesystem module";
homepage = "https://pypi.org/project/fatfs/";
license = licenses.mit;
maintainers = [ ];
};
}