Files
nixpkgs/pkgs/development/python-modules/django-rq/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

68 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
hatchling,
django,
redis,
rq,
prometheus-client,
sentry-sdk,
pytest-django,
pytestCheckHook,
pyyaml,
redisTestHook,
}:
buildPythonPackage rec {
pname = "django-rq";
version = "3.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "rq";
repo = "django-rq";
tag = "v${version}";
hash = "sha256-oHBQpGRiNJFt07KEPC+KcCF6qM5PgSTyr0t35iyYhK4=";
};
build-system = [ hatchling ];
dependencies = [
django
redis
rq
];
optional-dependencies = {
prometheus = [ prometheus-client ];
sentry = [ sentry-sdk ];
};
pythonImportsCheck = [ "django_rq" ];
# redis hook does not support darwin
doCheck = !stdenv.hostPlatform.isDarwin;
nativeCheckInputs = [
pytest-django
pytestCheckHook
pyyaml
redisTestHook
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
'';
meta = {
description = "Simple app that provides django integration for RQ (Redis Queue)";
homepage = "https://github.com/rq/django-rq";
changelog = "https://github.com/rq/django-rq/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
}