41 lines
1.0 KiB
Nix
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 = [ ];
|
|
};
|
|
}
|