2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
hatchling,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
click,
|
|
|
|
redis,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
psutil,
|
|
|
|
pytestCheckHook,
|
|
|
|
redis-server,
|
|
|
|
sentry-sdk,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rq";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.16.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rq";
|
|
|
|
repo = "rq";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-8uhCV4aJNbY273jOa9D5OlgEG1w3hXVncClKQTO9Pyk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ hatchling ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2022-09-09 14:08:57 +00:00
|
|
|
click
|
|
|
|
redis
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
psutil
|
|
|
|
pytestCheckHook
|
|
|
|
sentry-sdk
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
preCheck = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
PATH=$out/bin:$PATH
|
|
|
|
${redis-server}/bin/redis-server &
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postCheck = ''
|
|
|
|
kill %%
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/rq/rq/commit/fd261d5d8fc0fe604fa396ee6b9c9b7a7bb4142f
|
|
|
|
"test_clean_large_registry"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rq" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-09-09 14:08:57 +00:00
|
|
|
description = "Library for creating background jobs and processing them";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nvie/rq/";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/rq/rq/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ mrmebelman ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|