about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/flower/default.nix
blob: 3662116bc2a6ec7145f79b16cb88612f00fa4c9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchPypi
, celery
, humanize
, mock
, pytz
, tornado
, prometheus_client
}:

buildPythonPackage rec {
  pname = "flower";
  version = "0.9.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "cf27a254268bb06fd4972408d0518237fcd847f7da4b4cd8055e228150ace8f3";
  };

  postPatch = ''
    # rely on using example programs (flowers/examples/tasks.py) which
    # are not part of the distribution
    rm tests/load.py
    substituteInPlace  requirements/default.txt --replace "prometheus_client==0.8.0" "prometheus_client>=0.8.0"
  '';

  propagatedBuildInputs = [
    celery
    pytz
    tornado
    humanize
    prometheus_client
  ];

  checkInputs = [ mock ];

  pythonImportsCheck = [ "flower" ];

  meta = with lib; {
    description = "Celery Flower";
    homepage = "https://github.com/mher/flower";
    license = licenses.bsdOriginal;
    maintainers = [ maintainers.arnoldfarkas ];
    broken = (celery.version >= "5.0.2"); # currently broken with celery>=5.0 by https://github.com/mher/flower/pull/1021
  };
}