diff --git a/pkgs/development/python-modules/fastdiff/default.nix b/pkgs/development/python-modules/fastdiff/default.nix new file mode 100644 index 000000000000..b3e27d7a5e81 --- /dev/null +++ b/pkgs/development/python-modules/fastdiff/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytest-benchmark, wasmer }: + +buildPythonPackage rec { + pname = "fastdiff"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1ai95vjchl4396zjl1b69xfqvn9kn1y7c40d9l0qxdss0pcx6fk2"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'pytest-runner' "" + ''; + + propagatedBuildInputs = [ wasmer ]; + + checkInputs = [ pytestCheckHook pytest-benchmark ]; + + pythonImportsCheck = [ "fastdiff" ]; + disabledTests = [ "test_native" ]; + + 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; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 34091d7fe2eb..89c3c64db198 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2071,6 +2071,8 @@ in { fastcache = callPackage ../development/python-modules/fastcache { }; + fastdiff = callPackage ../development/python-modules/fastdiff { }; + fastdtw = callPackage ../development/python-modules/fastdtw { }; fastecdsa = callPackage ../development/python-modules/fastecdsa { };