nixpkgs/pkgs/development/python-modules/graphite-web/default.nix
2022-06-08 13:10:35 +02:00

73 lines
1.4 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, cairocffi
, django
, django_tagging
, fetchPypi
, gunicorn
, pyparsing
, python-memcached
, pythonOlder
, pytz
, six
, txamqp
, urllib3
, whisper
, whitenoise
}:
buildPythonPackage rec {
pname = "graphite-web";
version = "1.1.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Pxho1QWo2jJZYAMJx999bbELDVMr7Wp7wsssYPkc01o=";
};
propagatedBuildInputs = [
cairocffi
django
django_tagging
gunicorn
pyparsing
python-memcached
pytz
six
txamqp
urllib3
whisper
whitenoise
];
postPatch = ''
substituteInPlace setup.py \
--replace "Django>=1.8,<3.1" "Django" \
--replace "django-tagging==0.4.3" "django-tagging"
'';
# Carbon-s default installation is /opt/graphite. This env variable ensures
# carbon is installed as a regular Python module.
GRAPHITE_NO_PREFIX = "True";
preConfigure = ''
substituteInPlace webapp/graphite/settings.py \
--replace "join(WEBAPP_DIR, 'content')" "join('$out', 'webapp', 'content')"
'';
pythonImportsCheck = [
"graphite"
];
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "Enterprise scalable realtime graphing";
homepage = "http://graphiteapp.org/";
license = licenses.asl20;
maintainers = with maintainers; [ offline basvandijk ];
};
}