nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.7";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "MeirKriheli";
17 repo = "python-bidi";
18 tag = "v${version}";
19 hash = "sha256-8LNoQwUOa2pKEviBq24IHihUfhyMoA/IV+sBuFUhHdc=";
20 };
21
22 cargoDeps = rustPlatform.fetchCargoVendor {
23 inherit pname version src;
24 hash = "sha256-27DtYoxd0bPS4A/7HBmuLYCZrG5yu0Tp8jXIBPSrAdc=";
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 = [ ];
46 };
47}