summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/symspellpy/default.nix
blob: 0437f19871735239cca260fe46b250785d5fc075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  pytestCheckHook,

  setuptools,

  # for testing
  numpy,
  importlib-resources,

  # requirements
  editdistpy,
}:

buildPythonPackage rec {
  pname = "symspellpy";
  version = "6.9.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mammothb";
    repo = "symspellpy";
    tag = "v${version}";
    hash = "sha256-isxANYSiwN8pQ7/XfMtO7cyoGdTyrXYOZ6C5rDJsJIs=";
  };

  build-system = [ setuptools ];

  dependencies = [ editdistpy ];

  nativeCheckInputs = [
    pytestCheckHook
    numpy
    importlib-resources
  ];

  pythonImportsCheck = [
    "symspellpy"
    "symspellpy.symspellpy"
  ];

  meta = {
    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/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ vizid ];
  };
}