{ lib, buildPythonPackage, cargo, fetchFromGitHub, libiconv, packaging, poetry-core, pytestCheckHook, rustc, rustPlatform, }: buildPythonPackage rec { pname = "python-calamine"; version = "0.4.0"; pyproject = true; src = fetchFromGitHub { owner = "dimastbk"; repo = "python-calamine"; tag = "v${version}"; hash = "sha256-qbme5P/oo7djoKbGFd+mVz6p4sHl1zejQI9wOarHzMA="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; hash = "sha256-8X6TDCxeDLHObJ+q/bEYTonHe0bgXMnBrIz3rKalfyk="; }; buildInputs = [ libiconv ]; build-system = [ cargo poetry-core rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook rustc ]; dependencies = [ packaging ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "python_calamine" ]; meta = { description = "Python binding for calamine"; homepage = "https://github.com/dimastbk/python-calamine"; changelog = "https://github.com/dimastbk/python-calamine/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "python-calamine"; }; }