1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 buildPythonPackage, 6 7 # build-system 8 hatchling, 9 10 # dependencies 11 click, 12 redis, 13 14 # tests 15 addBinToPathHook, 16 psutil, 17 pytestCheckHook, 18 redisTestHook, 19 versionCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "rq"; 24 version = "2.4.1"; 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "rq"; 29 repo = "rq"; 30 tag = "v${version}"; 31 hash = "sha256-CtxirZg6WNQpTMoXQRvB8i/KB3r58WlKh+wjBvyVMMs="; 32 }; 33 34 build-system = [ hatchling ]; 35 36 dependencies = [ 37 click 38 redis 39 ]; 40 41 nativeCheckInputs = [ 42 addBinToPathHook 43 psutil 44 pytestCheckHook 45 redisTestHook 46 versionCheckHook 47 ]; 48 versionCheckProgramArg = "--version"; 49 50 __darwinAllowLocalNetworking = true; 51 52 # redisTestHook does not work on darwin-x86_64 53 doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); 54 55 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ 56 # PermissionError: [Errno 13] Permission denied: '/tmp/rq-tests.txt' 57 "test_deleted_jobs_arent_executed" 58 "test_suspend_worker_execution" 59 ]; 60 61 pythonImportsCheck = [ "rq" ]; 62 63 meta = { 64 description = "Library for creating background jobs and processing them"; 65 homepage = "https://github.com/nvie/rq/"; 66 changelog = "https://github.com/rq/rq/releases/tag/${src.tag}"; 67 license = lib.licenses.bsd2; 68 maintainers = with lib.maintainers; [ mrmebelman ]; 69 }; 70}