diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/development/python-modules/symspellpy | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/symspellpy')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/symspellpy/default.nix | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/symspellpy/default.nix b/nixpkgs/pkgs/development/python-modules/symspellpy/default.nix new file mode 100644 index 000000000000..ad3b732209ef --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/symspellpy/default.nix @@ -0,0 +1,76 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch + +, pythonOlder + +, pytestCheckHook + +, setuptools + + # for testing +, numpy +, importlib-resources + + # requirements +, editdistpy +}: + +buildPythonPackage rec { + pname = "symspellpy"; + version = "6.7.7"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + patches = [ + # patch for fix tests + # https://github.com/mammothb/symspellpy/pull/151 + (fetchpatch { + name = "fix-pkg-resources-deprecation-warning.patch"; + url = "https://github.com/mammothb/symspellpy/commit/b0298f4936f28a79612f5509612210868548793f.patch"; + hash = "sha256-mdUJMrcPv5zczIRP+8u5vicz2IE1AUN3YP0+zg3jqZg="; + }) + (fetchpatch { + name = "fix-error-message-checking-py312.patch"; + url = "https://github.com/mammothb/symspellpy/commit/f6f91e18316bed717036306c33d2ee82a922563a.patch"; + hash = "sha256-a5KsESIEIzlbcEPq8sTB2+XkuT/vP81U8StZhaL0MbA="; + }) + ]; + + src = fetchFromGitHub { + owner = "mammothb"; + repo = "symspellpy"; + rev = "refs/tags/v${version}"; + hash = "sha256-D8xdMCy4fSff3nuS2sD2QHWk0869AlFDE+lFRvayYDQ="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + editdistpy + ]; + + nativeCheckInputs = [ + pytestCheckHook + numpy + importlib-resources + ]; + + pythonImportsCheck = [ + "symspellpy" + "symspellpy.symspellpy" + ]; + + meta = with lib; + { + description = "Python port of SymSpell v6.7.1, which provides much higher speed and lower memory consumption"; + homepage = "https://github.com/mammothb/symspellpy"; + changelog = "https://github.com/mammothb/symspellpy/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ vizid ]; + }; +} |