2022-08-12 12:06:08 +00:00
|
|
|
{ arrow
|
|
|
|
, blessed
|
|
|
|
, buildPythonPackage
|
|
|
|
, croniter
|
|
|
|
, django
|
|
|
|
, django-redis
|
|
|
|
, django-picklefield
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, lib
|
|
|
|
, poetry-core
|
|
|
|
, pytest-django
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pkgs
|
|
|
|
, stdenv
|
|
|
|
}:
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Koed00";
|
|
|
|
repo = "django-q";
|
|
|
|
sha256 = "sha256-gFSrAl3QGoJEJfvTTvLQgViPPjeJ6BfvgEwgLLo+uAA=";
|
|
|
|
rev = "v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
django-picklefield
|
|
|
|
arrow
|
|
|
|
blessed
|
|
|
|
django
|
|
|
|
future
|
|
|
|
];
|
|
|
|
|
|
|
|
# fixes empty version string
|
|
|
|
# analog to https://github.com/NixOS/nixpkgs/pull/171200
|
|
|
|
patches = [
|
|
|
|
./pep-621.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"django_q"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
${pkgs.redis}/bin/redis-server &
|
|
|
|
REDIS_PID=$!
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
kill $REDIS_PID
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
croniter
|
|
|
|
django-redis
|
|
|
|
pytest-django
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
license = licenses.mit;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|