2023-01-20 10:41:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, wasmer
|
|
|
|
, wasmer-compiler-cranelift
|
|
|
|
, py
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-benchmark
|
|
|
|
}:
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastdiff";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.3.0";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "4dfa09c47832a8c040acda3f1f55fc0ab4d666f0e14e6951e6da78d59acd945a";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'pytest-runner' ""
|
2021-09-18 10:52:07 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "collect_ignore = ['setup.py']" ""
|
2021-01-09 10:05:03 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
wasmer
|
|
|
|
wasmer-compiler-cranelift
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-benchmark
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--benchmark-skip"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastdiff"
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast native implementation of diff algorithm with a pure Python fallback";
|
|
|
|
homepage = "https://github.com/syrusakbary/fastdiff";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-09-18 10:52:07 +00:00
|
|
|
# resulting compiled object panics at import
|
|
|
|
broken = stdenv.is32bit;
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|