depot/third_party/nixpkgs/pkgs/development/python-modules/fastdiff/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

53 lines
1.1 KiB
Nix

{
stdenv,
lib,
buildPythonPackage,
fetchPypi,
wasmer,
wasmer-compiler-cranelift,
py,
pytestCheckHook,
pytest-benchmark,
}:
buildPythonPackage rec {
pname = "fastdiff";
version = "0.3.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "4dfa09c47832a8c040acda3f1f55fc0ab4d666f0e14e6951e6da78d59acd945a";
};
postPatch = ''
substituteInPlace setup.py \
--replace 'pytest-runner' ""
substituteInPlace setup.cfg \
--replace "collect_ignore = ['setup.py']" ""
'';
propagatedBuildInputs = [
wasmer
wasmer-compiler-cranelift
];
nativeCheckInputs = [
py
pytestCheckHook
pytest-benchmark
];
pytestFlagsArray = [ "--benchmark-skip" ];
pythonImportsCheck = [ "fastdiff" ];
meta = with lib; {
description = "Fast native implementation of diff algorithm with a pure Python fallback";
homepage = "https://github.com/syrusakbary/fastdiff";
license = licenses.mit;
maintainers = with maintainers; [ ];
# resulting compiled object panics at import
broken = stdenv.is32bit;
};
}