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 pname version src; 24 hash = "sha256-Oqtva9cTHAcuOXr/uPbqZczDbPVr0zeIEr5p6PoJ610="; 25 }; 26 27 buildInputs = [ libiconv ]; 28 29 build-system = [ 30 rustPlatform.cargoSetupHook 31 rustPlatform.maturinBuildHook 32 ]; 33 34 preCheck = '' 35 rm -rf bidi 36 ''; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 meta = { 41 homepage = "https://github.com/MeirKriheli/python-bidi"; 42 description = "Pure python implementation of the BiDi layout algorithm"; 43 mainProgram = "pybidi"; 44 platforms = lib.platforms.unix; 45 maintainers = with lib.maintainers; [ freezeboy ]; 46 }; 47}