From de2963ddfeba4055e3fc637c701c397cbcdbebd3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Aug 2024 02:19:33 +0200 Subject: [PATCH] python312Packages.python-bidi: 0.4.2 -> 0.6.0 https://github.com/MeirKriheli/python-bidi/releases/tag/v0.5.0 https://github.com/MeirKriheli/python-bidi/releases/tag/v0.5.1 https://github.com/MeirKriheli/python-bidi/releases/tag/v0.5.2 https://github.com/MeirKriheli/python-bidi/releases/tag/v0.6.0 --- .../python-modules/python-bidi/default.nix | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) 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";