Files
nix-config/packages/python/fatfs-ng/default.nix
mjallen18 001b54a620 nuc
2026-03-16 17:13:12 -05:00

41 lines
1.0 KiB
Nix

{
lib,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "fatfs-ng";
version = "0.1.15";
format = "setuptools";
src = python3Packages.fetchPypi {
pname = "fatfs_ng";
inherit version;
hash = "sha256-Uwgr6kzX6e5mHUokWEr0tjDxTK1giWrGmyMbrM91X4o=";
};
# wrapper.c is pre-generated in the sdist; Cython is not needed at build time.
# Patch out setup_requires=['cython'] to prevent setuptools from trying to
# fetch it via pip at build time (which fails in the Nix sandbox).
postPatch = ''
substituteInPlace setup.py \
--replace-fail "setup_requires=['cython']," ""
'';
nativeBuildInputs = with python3Packages; [
setuptools
];
doCheck = false;
# fatfs-ng installs under the 'fatfs' namespace (ext_package='fatfs')
pythonImportsCheck = [ "fatfs" ];
meta = with lib; {
description = "Enhanced Python wrapper around ChaN's FatFS library with ESP32 wear-leveling support";
homepage = "https://github.com/Jason2866/pyfatfs";
license = licenses.mit;
maintainers = [ ];
};
}