Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 poetry-core,
7}:
8
9buildPythonPackage rec {
10 pname = "spylls";
11 version = "0.1.7";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-cEWJLcvTJNNoX2nFp2AGPnj7g5kTckzhgHfPCgyT8iA=";
17 };
18
19 postPatch = ''
20 substituteInPlace pyproject.toml \
21 --replace-fail poetry.masonry.api poetry.core.masonry.api \
22 --replace-fail "poetry>=" "poetry-core>="
23 '';
24
25 build-system = [ poetry-core ];
26
27 # no unit tests in source distribution...
28 doCheck = false;
29
30 pythonImportsCheck = [
31 "spylls.hunspell"
32 "spylls.hunspell.readers"
33 "spylls.hunspell.data"
34 "spylls.hunspell.algo.capitalization"
35 "spylls.hunspell.algo.trie"
36 "spylls.hunspell.algo.ngram_suggest"
37 "spylls.hunspell.algo.phonet_suggest"
38 "spylls.hunspell.algo.permutations"
39 "spylls.hunspell.algo.string_metrics"
40 ];
41
42 meta = {
43 description = "Pure Python spell-checker, (almost) full port of Hunspell";
44 homepage = "https://github.com/zverok/spylls";
45 changelog = "https://github.com/zverok/spylls/blob/master/CHANGELOG.rst";
46 license = lib.licenses.mpl20;
47 maintainers = with lib.maintainers; [ vizid ];
48 };
49}