diff --git a/pkgs/development/python-modules/python-bidi/default.nix b/pkgs/development/python-modules/python-bidi/default.nix index c18f52714c3c..0c35e6579696 100644 --- a/pkgs/development/python-modules/python-bidi/default.nix +++ b/pkgs/development/python-modules/python-bidi/default.nix @@ -1,21 +1,39 @@ { lib, buildPythonPackage, - fetchPypi, - six, + fetchFromGitHub, + rustPlatform, + pytestCheckHook, }: buildPythonPackage rec { pname = "python-bidi"; - version = "0.4.2"; - format = "setuptools"; + version = "0.6.0"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "U0f3HoKz6Zdtxlfwne0r/jm6jWd3yoGlssVsMBIcSW4="; + src = fetchFromGitHub { + owner = "MeirKriheli"; + repo = "python-bidi"; + rev = "refs/tags/v${version}"; + hash = "sha256-LrXt9qaXfy8Rn9HjU4YSTFT4WsqzwCgh0flcxXOTF6E="; }; - propagatedBuildInputs = [ six ]; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-34R8T8cXiX1iRx/Zb51Eb/nf0wLpN38hz0VnsmzPzws="; + }; + + build-system = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + ]; + + preCheck = '' + rm -rf bidi + ''; + + nativeCheckInputs = [ pytestCheckHook ]; meta = with lib; { homepage = "https://github.com/MeirKriheli/python-bidi";