spicedb: 1.39.1 -> 1.40.0
[NixPkgs.git] / pkgs / development / python-modules / django-haystack / default.nix
blob1ee1380b48f44d6d13dcc7bfa9b85109f10be2fa
2   lib,
3   buildPythonPackage,
4   django,
5   elasticsearch,
6   fetchPypi,
7   geopy,
8   packaging,
9   pysolr,
10   python-dateutil,
11   pythonOlder,
12   requests,
13   setuptools-scm,
14   setuptools,
15   stdenv,
16   whoosh,
19 buildPythonPackage rec {
20   pname = "django-haystack";
21   version = "3.3.0";
22   pyproject = true;
24   disabled = pythonOlder "3.8";
26   src = fetchPypi {
27     pname = "django_haystack";
28     inherit version;
29     hash = "sha256-487ta4AAYl2hTUCetNrGmJSQXirIrBj5v9tZMjygLqs=";
30   };
32   build-system = [
33     setuptools
34     setuptools-scm
35   ];
37   buildInputs = [ django ];
39   dependencies = [ packaging ];
41   optional-dependencies = {
42     elasticsearch = [ elasticsearch ];
43   };
45   # tests fail and get stuck on darwin
46   doCheck = !stdenv.hostPlatform.isDarwin;
48   nativeCheckInputs = [
49     geopy
50     pysolr
51     python-dateutil
52     requests
53     whoosh
54   ] ++ optional-dependencies.elasticsearch;
56   checkPhase = ''
57     runHook preCheck
58     python test_haystack/run_tests.py
59     runHook postCheck
60   '';
62   meta = with lib; {
63     description = "Pluggable search for Django";
64     homepage = "http://haystacksearch.org/";
65     changelog = "https://github.com/django-haystack/django-haystack/releases/tag/v${version}";
66     license = licenses.bsd3;
67     maintainers = [ ];
68   };