László Vaskó 90b1a0b353 python3Packages.pyfatfs: init at 1.1.0
This is a dependency for Unblob (#217836)
2025-01-08 10:32:48 +01:00

55 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
gitUpdater,
setuptools,
setuptools-scm,
fs,
pytestCheckHook,
pytest-mock,
}:
buildPythonPackage rec {
pname = "pyfatfs";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "nathanhi";
repo = "pyfatfs";
tag = "v${version}";
hash = "sha256-26b4EV3WERUqJ10VkYov3PDFhSBcfxCF79P8Eg5xpoM=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [ fs ];
postPatch = ''
substituteInPlace ./pyproject.toml \
--replace-fail 'setuptools ~= 67.8' setuptools \
--replace-fail '"setuptools_scm[toml] ~= 7.1"' ""
'';
nativeCheckInputs = [
pytestCheckHook
pytest-mock
];
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Python based FAT12/FAT16/FAT32 implementation with VFAT support";
homepage = "https://github.com/nathanhi/pyfatfs";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ vlaci ];
};
}