2021-03-25 07:34:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-03-20 19:23:01 +00:00
|
|
|
, django
|
|
|
|
, memcached
|
|
|
|
, txamqp
|
|
|
|
, django_tagging
|
|
|
|
, gunicorn
|
|
|
|
, pytz
|
|
|
|
, pyparsing
|
|
|
|
, cairocffi
|
|
|
|
, whisper
|
|
|
|
, whitenoise
|
|
|
|
, urllib3
|
|
|
|
, six
|
2018-08-02 15:39:57 +01:00
|
|
|
}:
|
2021-03-20 19:23:01 +00:00
|
|
|
|
2020-03-20 15:39:15 +00:00
|
|
|
buildPythonPackage rec {
|
2018-08-02 15:39:57 +01:00
|
|
|
pname = "graphite-web";
|
2021-06-18 22:47:21 +01:00
|
|
|
version = "1.1.8";
|
2018-08-02 15:39:57 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 22:47:21 +01:00
|
|
|
sha256 = "54240b0f1e069b53e2ce92d4e534e21b195fb0ebd64b6ad8a49c44284e3eb0b1";
|
2018-08-02 15:39:57 +01:00
|
|
|
};
|
|
|
|
|
2020-03-20 15:39:15 +00:00
|
|
|
patches = [
|
|
|
|
./update-django-tagging.patch
|
|
|
|
];
|
|
|
|
|
2021-05-06 14:32:55 +01:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/graphite-project/graphite-web/pull/2701
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'scandir'" "'scandir; python_version < \"3.5\"'"
|
|
|
|
'';
|
|
|
|
|
2018-08-02 15:39:57 +01:00
|
|
|
propagatedBuildInputs = [
|
2021-03-20 19:23:01 +00:00
|
|
|
django
|
|
|
|
memcached
|
|
|
|
txamqp
|
|
|
|
django_tagging
|
|
|
|
gunicorn
|
|
|
|
pytz
|
|
|
|
pyparsing
|
|
|
|
cairocffi
|
|
|
|
whisper
|
|
|
|
whitenoise
|
|
|
|
urllib3
|
|
|
|
six
|
2018-08-02 15:39:57 +01:00
|
|
|
];
|
|
|
|
|
2020-03-20 15:39:15 +00:00
|
|
|
# Carbon-s default installation is /opt/graphite. This env variable ensures
|
|
|
|
# carbon is installed as a regular python module.
|
|
|
|
GRAPHITE_NO_PREFIX="True";
|
2018-08-02 15:39:57 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace webapp/graphite/settings.py \
|
|
|
|
--replace "join(WEBAPP_DIR, 'content')" "join('$out', 'webapp', 'content')"
|
|
|
|
'';
|
|
|
|
|
2021-03-20 19:23:01 +00:00
|
|
|
pythonImportsCheck = [ "graphite" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-20 15:39:15 +00:00
|
|
|
homepage = "http://graphiteapp.org/";
|
2018-08-02 15:39:57 +01:00
|
|
|
description = "Enterprise scalable realtime graphing";
|
2019-08-20 14:24:01 +01:00
|
|
|
maintainers = with maintainers; [ offline basvandijk ];
|
2018-08-02 15:39:57 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|