1{ lib
2, buildPythonPackage
3, fetchPypi
4, django
5, memcached
6, txamqp
7, django_tagging
8, gunicorn
9, pytz
10, pyparsing
11, cairocffi
12, whisper
13, whitenoise
14, urllib3
15, six
16}:
17
18buildPythonPackage rec {
19 pname = "graphite-web";
20 version = "1.1.8";
21
22 src = fetchPypi {
23 inherit pname version;
24 sha256 = "54240b0f1e069b53e2ce92d4e534e21b195fb0ebd64b6ad8a49c44284e3eb0b1";
25 };
26
27 patches = [
28 ./update-django-tagging.patch
29 ];
30
31 postPatch = ''
32 # https://github.com/graphite-project/graphite-web/pull/2701
33 substituteInPlace setup.py \
34 --replace "'scandir'" "'scandir; python_version < \"3.5\"'"
35 '';
36
37 propagatedBuildInputs = [
38 django
39 memcached
40 txamqp
41 django_tagging
42 gunicorn
43 pytz
44 pyparsing
45 cairocffi
46 whisper
47 whitenoise
48 urllib3
49 six
50 ];
51
52 # Carbon-s default installation is /opt/graphite. This env variable ensures
53 # carbon is installed as a regular python module.
54 GRAPHITE_NO_PREFIX="True";
55
56 preConfigure = ''
57 substituteInPlace webapp/graphite/settings.py \
58 --replace "join(WEBAPP_DIR, 'content')" "join('$out', 'webapp', 'content')"
59 '';
60
61 pythonImportsCheck = [ "graphite" ];
62
63 meta = with lib; {
64 homepage = "http://graphiteapp.org/";
65 description = "Enterprise scalable realtime graphing";
66 maintainers = with maintainers; [ offline basvandijk ];
67 license = licenses.asl20;
68 };
69}