nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "whoosh";
11 version = "2.7.4";
12 pyproject = true;
13
14 src = fetchPypi {
15 pname = "Whoosh";
16 inherit version;
17 hash = "sha256-fKVjPb+p4OD6QA0xUaigxL7FO9Ls7cCmdwWxdWXDGoM=";
18 };
19
20 build-system = [ setuptools ];
21
22 nativeCheckInputs = [ pytestCheckHook ];
23
24 # Wrong encoding
25 postPatch = ''
26 rm tests/test_reading.py
27 substituteInPlace setup.cfg \
28 --replace-fail "[pytest]" "[tool:pytest]"
29 '';
30
31 pythonImportsCheck = [ "whoosh" ];
32
33 disabledTests = [ "test_minimize_dfa" ];
34
35 meta = {
36 description = "Fast, pure-Python full text indexing, search, and spell checking library";
37 homepage = "https://github.com/mchaput/whoosh";
38 license = lib.licenses.bsd2;
39 maintainers = [ ];
40 };
41}