Files
nixpkgs/pkgs/development/python-modules/python-bidi/default.nix

48 lines
966 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
rustPlatform,
libiconv,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "python-bidi";
version = "0.6.7";
pyproject = true;
src = fetchFromGitHub {
owner = "MeirKriheli";
repo = "python-bidi";
tag = "v${version}";
hash = "sha256-8LNoQwUOa2pKEviBq24IHihUfhyMoA/IV+sBuFUhHdc=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-27DtYoxd0bPS4A/7HBmuLYCZrG5yu0Tp8jXIBPSrAdc=";
};
buildInputs = [ libiconv ];
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
preCheck = ''
rm -rf bidi
'';
nativeCheckInputs = [ pytestCheckHook ];
meta = {
homepage = "https://github.com/MeirKriheli/python-bidi";
description = "Pure python implementation of the BiDi layout algorithm";
mainProgram = "pybidi";
platforms = lib.platforms.unix;
maintainers = [ ];
};
}