1{ stdenv, lib, buildPythonPackage, fetchPypi, wasmer, wasmer-compiler-cranelift, pytestCheckHook, pytest-benchmark }: 2 3buildPythonPackage rec { 4 pname = "fastdiff"; 5 version = "0.3.0"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "4dfa09c47832a8c040acda3f1f55fc0ab4d666f0e14e6951e6da78d59acd945a"; 10 }; 11 12 postPatch = '' 13 substituteInPlace setup.py \ 14 --replace 'pytest-runner' "" 15 substituteInPlace setup.cfg \ 16 --replace "collect_ignore = ['setup.py']" "" 17 ''; 18 19 propagatedBuildInputs = [ wasmer wasmer-compiler-cranelift ]; 20 21 checkInputs = [ pytestCheckHook pytest-benchmark ]; 22 23 pythonImportsCheck = [ "fastdiff" ]; 24 25 meta = with lib; { 26 description = "A fast native implementation of diff algorithm with a pure Python fallback"; 27 homepage = "https://github.com/syrusakbary/fastdiff"; 28 license = licenses.mit; 29 maintainers = with maintainers; [ SuperSandro2000 ]; 30 # resulting compiled object panics at import 31 broken = stdenv.is32bit; 32 }; 33}