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