Files
nixpkgs/pkgs/development/python-modules/django-haystack/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

71 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
django,
elasticsearch,
fetchPypi,
geopy,
packaging,
pysolr,
python-dateutil,
pythonOlder,
requests,
setuptools-scm,
setuptools,
stdenv,
whoosh,
}:
buildPythonPackage rec {
pname = "django-haystack";
version = "3.3.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "django_haystack";
inherit version;
hash = "sha256-487ta4AAYl2hTUCetNrGmJSQXirIrBj5v9tZMjygLqs=";
};
build-system = [
setuptools
setuptools-scm
];
buildInputs = [ django ];
dependencies = [ packaging ];
optional-dependencies = {
elasticsearch = [ elasticsearch ];
};
# tests fail and get stuck on darwin
doCheck = !stdenv.hostPlatform.isDarwin;
nativeCheckInputs = [
geopy
pysolr
python-dateutil
requests
whoosh
]
++ optional-dependencies.elasticsearch;
checkPhase = ''
runHook preCheck
python test_haystack/run_tests.py
runHook postCheck
'';
meta = {
description = "Pluggable search for Django";
homepage = "http://haystacksearch.org/";
changelog = "https://github.com/django-haystack/django-haystack/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}