1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 rustPlatform, 6 libiconv, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "python-bidi"; 12 version = "0.6.6"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "MeirKriheli"; 17 repo = "python-bidi"; 18 tag = "v${version}"; 19 hash = "sha256-8erpcrjAp/1ugPe6cOvjH2CVfy2/hO6xg+cfWWUbj0w="; 20 }; 21 22 cargoDeps = rustPlatform.fetchCargoVendor { 23 inherit src; 24 name = "${pname}-${version}"; 25 hash = "sha256-Oqtva9cTHAcuOXr/uPbqZczDbPVr0zeIEr5p6PoJ610="; 26 }; 27 28 buildInputs = [ libiconv ]; 29 30 build-system = [ 31 rustPlatform.cargoSetupHook 32 rustPlatform.maturinBuildHook 33 ]; 34 35 preCheck = '' 36 rm -rf bidi 37 ''; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 meta = { 42 homepage = "https://github.com/MeirKriheli/python-bidi"; 43 description = "Pure python implementation of the BiDi layout algorithm"; 44 mainProgram = "pybidi"; 45 platforms = lib.platforms.unix; 46 maintainers = with lib.maintainers; [ freezeboy ]; 47 }; 48}