diff --git a/pkgs/development/python-modules/pyfatfs/default.nix b/pkgs/development/python-modules/pyfatfs/default.nix new file mode 100644 index 000000000000..0d1914c58efa --- /dev/null +++ b/pkgs/development/python-modules/pyfatfs/default.nix @@ -0,0 +1,54 @@ +{ + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e40bb1c76dbb..806bcbca373d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11705,6 +11705,8 @@ self: super: with self; { pyfantom = callPackage ../development/python-modules/pyfantom { }; + pyfatfs = callPackage ../development/python-modules/pyfatfs { }; + pyfcm = callPackage ../development/python-modules/pyfcm { }; pyfido = callPackage ../development/python-modules/pyfido { };