diff --git a/pkgs/development/python-modules/pyiceberg-core/default.nix b/pkgs/development/python-modules/pyiceberg-core/default.nix new file mode 100644 index 000000000000..b3a60ba2842d --- /dev/null +++ b/pkgs/development/python-modules/pyiceberg-core/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + rustPlatform, + + # tests + datafusion, + pyarrow, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pyiceberg-core"; + version = "0.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "apache"; + repo = "iceberg-rust"; + tag = "v${version}"; + hash = "sha256-vRSZnMkZptGkLZBN1RRu0YGRQCOgJioBIghXnvU9UXc="; + }; + + sourceRoot = "${src.name}/bindings/python"; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit + pname + version + src + sourceRoot + ; + hash = "sha256-QfNVqyZ/O3vZAf689Fg5qPY6jcN4G1zo2eS2AEcdIL4="; + }; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + ]; + + pythonImportsCheck = [ "pyiceberg_core" ]; + + nativeCheckInputs = [ + pyarrow + pytestCheckHook + ]; + + disabledTestPaths = [ + # Circular dependency on pyiceberg + "tests/test_datafusion_table_provider.py" + ]; + + meta = { + description = "Iceberg-rust powered core for pyiceberg"; + homepage = "https://github.com/apache/iceberg-rust/tree/main/bindings/python"; + changelog = "https://github.com/apache/iceberg-rust/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9e7bfc8df7f1..f1349c54e9d6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13162,6 +13162,8 @@ self: super: with self; { pyiceberg = callPackage ../development/python-modules/pyiceberg { }; + pyiceberg-core = callPackage ../development/python-modules/pyiceberg-core { }; + pyicloud = callPackage ../development/python-modules/pyicloud { }; pyicu = callPackage ../development/python-modules/pyicu { };