1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6
7 # build-system
8 hatchling,
9
10 # dependencies
11 click,
12 redis,
13
14 # tests
15 psutil,
16 pytestCheckHook,
17 redis-server,
18 sentry-sdk,
19}:
20
21buildPythonPackage rec {
22 pname = "rq";
23 version = "1.16.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "rq";
30 repo = "rq";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-8uhCV4aJNbY273jOa9D5OlgEG1w3hXVncClKQTO9Pyk=";
33 };
34
35 build-system = [ hatchling ];
36
37 dependencies = [
38 click
39 redis
40 ];
41
42 nativeCheckInputs = [
43 psutil
44 pytestCheckHook
45 sentry-sdk
46 ];
47
48 preCheck = ''
49 PATH=$out/bin:$PATH
50 ${redis-server}/bin/redis-server &
51 '';
52
53 postCheck = ''
54 kill %%
55 '';
56
57 __darwinAllowLocalNetworking = true;
58
59 disabledTests = [
60 # https://github.com/rq/rq/commit/fd261d5d8fc0fe604fa396ee6b9c9b7a7bb4142f
61 "test_clean_large_registry"
62 ];
63
64 pythonImportsCheck = [ "rq" ];
65
66 meta = with lib; {
67 description = "Library for creating background jobs and processing them";
68 homepage = "https://github.com/nvie/rq/";
69 changelog = "https://github.com/rq/rq/releases/tag/v${version}";
70 license = licenses.bsd2;
71 maintainers = with maintainers; [ mrmebelman ];
72 };
73}