anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / celery-singleton / default.nix
blob3d75770e932a40a29ff4d125ccb0aa779c8dc39b
2   lib,
3   buildPythonPackage,
4   fetchpatch,
5   fetchFromGitHub,
6   poetry-core,
7   celery,
8   redis,
9   pytestCheckHook,
10   pytest-celery,
11   pytest-cov-stub,
14 buildPythonPackage rec {
15   pname = "celery-singleton";
16   version = "0.3.1";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "steinitzu";
21     repo = "celery-singleton";
22     rev = version;
23     hash = "sha256-fHlakxxjYIADELZdxIj6rvsZ/+1QfnKvAg3w5cdzvDc=";
24   };
26   patches = [
27     # chore(poetry): use poetry-core
28     # https://github.com/steinitzu/celery-singleton/pull/54
29     (fetchpatch {
30       name = "use-poetry-core.patch";
31       url = "https://github.com/steinitzu/celery-singleton/pull/54/commits/634a001c92a1dff1fae513fc95d733ea9b87e4cf.patch";
32       hash = "sha256-lXN4khwyL96pWyBS+iuSkGEkegv4HxYtym+6JUcPa94=";
33     })
34   ];
36   build-system = [ poetry-core ];
38   dependencies = [
39     celery
40     redis
41   ];
43   checkInputs = [
44     pytestCheckHook
45     pytest-celery
46     pytest-cov-stub
47   ];
49   pytestFlagsArray = [ "tests" ];
51   # Tests require a running Redis backend
52   disabledTests = [
53     "TestLock"
54     "TestUnlock"
55     "TestClear"
56     "TestSimpleTask"
57     "TestRaiseOnDuplicateConfig"
58     "TestUniqueOn"
59   ];
61   pythonImportsCheck = [ "celery_singleton" ];
63   meta = with lib; {
64     description = "Seamlessly prevent duplicate executions of celery tasks";
65     homepage = "https://github.com/steinitzu/celery-singleton";
66     changelog = "https://github.com/steinitzu/celery-singleton/blob/${src.rev}/CHANGELOG.md";
67     license = licenses.mit;
68     maintainers = with maintainers; [ onny ];
69   };