2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, arrow
|
2022-08-12 12:06:08 +00:00
|
|
|
, blessed
|
|
|
|
, buildPythonPackage
|
|
|
|
, croniter
|
|
|
|
, django
|
|
|
|
, django-picklefield
|
2023-11-16 04:20:00 +00:00
|
|
|
, django-redis
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
2023-11-16 04:20:00 +00:00
|
|
|
, pkgs
|
2022-08-12 12:06:08 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-django
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
, redis
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-q";
|
2021-08-27 14:25:00 +00:00
|
|
|
version = "1.3.9";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Koed00";
|
|
|
|
repo = "django-q";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-gFSrAl3QGoJEJfvTTvLQgViPPjeJ6BfvgEwgLLo+uAA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# fixes empty version string
|
|
|
|
# analog to https://github.com/NixOS/nixpkgs/pull/171200
|
|
|
|
patches = [
|
|
|
|
./pep-621.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
django-picklefield
|
|
|
|
arrow
|
|
|
|
blessed
|
|
|
|
django
|
|
|
|
future
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
croniter
|
|
|
|
django-redis
|
|
|
|
pytest-django
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ django-redis.optional-dependencies.hiredis;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"django_q"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
${pkgs.redis}/bin/redis-server &
|
|
|
|
REDIS_PID=$!
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
kill $REDIS_PID
|
|
|
|
'';
|
|
|
|
|
|
|
|
# don't bother with two more servers to test
|
|
|
|
disabledTests = [
|
|
|
|
"test_disque"
|
|
|
|
"test_mongo"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A multiprocessing distributed task queue for Django";
|
|
|
|
homepage = "https://django-q.readthedocs.org";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/Koed00/django-q/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2023-11-16 04:20:00 +00:00
|
|
|
# django-q is unmaintained at the moment
|
|
|
|
# https://github.com/Koed00/django-q/issues/733
|
|
|
|
broken = lib.versionAtLeast redis.version "5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|