at master 960 B view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 rustPlatform, 7 cargo, 8 rustc, 9 libiconv, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "y-py"; 15 version = "0.6.2"; 16 format = "pyproject"; 17 18 src = fetchPypi { 19 pname = "y_py"; 20 inherit version; 21 hash = "sha256-R1eoKlBAags6MzqgEiAZozG9bxbkn+1n3KQj+Siz/U0="; 22 }; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit pname version src; 26 hash = "sha256-Wh25tLOVhAYFLqjOrKSu4klB1hGSOMconC1xZG31Dbw="; 27 }; 28 29 nativeBuildInputs = [ 30 rustPlatform.cargoSetupHook 31 rustPlatform.maturinBuildHook 32 cargo 33 rustc 34 ]; 35 36 buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; 37 38 pythonImportsCheck = [ "y_py" ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 meta = { 43 description = "Python bindings for Y-CRDT"; 44 homepage = "https://github.com/y-crdt/ypy"; 45 license = lib.licenses.mit; 46 maintainers = with lib.maintainers; [ dotlambda ]; 47 }; 48}