1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6}:
7
8buildPythonPackage rec {
9 pname = "pytest-celery";
10 version = "0.1.0";
11
12 format = "pyproject";
13
14 src = fetchFromGitHub {
15 owner = "celery";
16 repo = "pytest-celery";
17 rev = "v${version}";
18 hash = "sha256-vzWwkOS3BLOInaFDk+PegvEmC88ZZ1sG1CmHwhn7r9w=";
19 };
20
21 postPatch = ''
22 # avoid infinite recursion with celery
23 substituteInPlace pyproject.toml \
24 --replace '"celery >= 4.4.0"' ""
25 '';
26
27 nativeBuildInputs = [ flit-core ];
28
29 # This package has nothing to test or import.
30 doCheck = false;
31
32 meta = with lib; {
33 description = "Pytest plugin to enable celery.contrib.pytest";
34 homepage = "https://github.com/celery/pytest-celery";
35 license = licenses.mit;
36 maintainers = [ ];
37 };
38}