Files
nixpkgs/pkgs/development/python-modules/django-haystack/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

68 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
django,
elasticsearch,
fetchPypi,
geopy,
packaging,
pysolr,
python-dateutil,
requests,
setuptools-scm,
setuptools,
stdenv,
whoosh,
}:
buildPythonPackage rec {
pname = "django-haystack";
version = "3.3.0";
pyproject = true;
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 = [ ];
};
}