diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/graphite-web')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/graphite-web/default.nix | 37 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/graphite-web/update-django-tagging.patch | 12 |
2 files changed, 22 insertions, 27 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/graphite-web/default.nix b/nixpkgs/pkgs/development/python-modules/graphite-web/default.nix index 88e3118d456..9499a9a6fe2 100644 --- a/nixpkgs/pkgs/development/python-modules/graphite-web/default.nix +++ b/nixpkgs/pkgs/development/python-modules/graphite-web/default.nix @@ -1,52 +1,35 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k, which +{ stdenv, buildPythonPackage, fetchPypi, isPy3k , django, django_tagging, whisper, pycairo, cairocffi, ldap, memcached, pytz, urllib3, scandir }: -if django.version != "1.8.19" -|| django_tagging.version != "0.4.3" -then throw "graphite-web should be build with django_1_8 and django_tagging_0_4_3" -else buildPythonPackage rec { +buildPythonPackage rec { pname = "graphite-web"; version = "1.1.6"; - disabled = isPy3k; - src = fetchPypi { inherit pname version; sha256 = "f4c293008ad588456397cd125cdad7f47f4bab5b6dd82b5fb69f5467e7346a2a"; }; + patches = [ + ./update-django-tagging.patch + ]; + propagatedBuildInputs = [ django django_tagging whisper pycairo cairocffi ldap memcached pytz urllib3 scandir ]; - postInstall = '' - wrapProgram $out/bin/run-graphite-devel-server.py \ - --prefix PATH : ${which}/bin - ''; + # Carbon-s default installation is /opt/graphite. This env variable ensures + # carbon is installed as a regular python module. + GRAPHITE_NO_PREFIX="True"; preConfigure = '' - # graphite is configured by storing a local_settings.py file inside the - # graphite python package. Since that package is stored in the immutable - # Nix store we can't modify it. So how do we configure graphite? - # - # First of all we rename "graphite.local_settings" to - # "graphite_local_settings" so that the settings are not looked up in the - # graphite package anymore. Secondly we place a directory containing a - # graphite_local_settings.py on the PYTHONPATH in the graphite module - # <nixpkgs/nixos/modules/services/monitoring/graphite.nix>. - substituteInPlace webapp/graphite/settings.py \ - --replace "graphite.local_settings" " graphite_local_settings" - substituteInPlace webapp/graphite/settings.py \ --replace "join(WEBAPP_DIR, 'content')" "join('$out', 'webapp', 'content')" ''; - # error: invalid command 'test' - doCheck = false; - meta = with stdenv.lib; { - homepage = http://graphite.wikidot.com/; + homepage = "http://graphiteapp.org/"; description = "Enterprise scalable realtime graphing"; maintainers = with maintainers; [ offline basvandijk ]; license = licenses.asl20; diff --git a/nixpkgs/pkgs/development/python-modules/graphite-web/update-django-tagging.patch b/nixpkgs/pkgs/development/python-modules/graphite-web/update-django-tagging.patch new file mode 100644 index 00000000000..48d16d50f42 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/graphite-web/update-django-tagging.patch @@ -0,0 +1,12 @@ +diff -Nur a/setup.py b/setup.py +--- a/setup.py 2020-03-12 18:45:34.654296302 +0100 ++++ b/setup.py 2020-03-12 18:46:17.476893828 +0100 +@@ -115,7 +115,7 @@ + ['templates/*', 'local_settings.py.example']}, + scripts=glob('bin/*'), + data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, +- install_requires=['Django>=1.8,<2.3', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], ++ install_requires=['Django>=1.8,<2.3', 'django-tagging==0.4.6', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], + classifiers=[ + 'Intended Audience :: Developers', + 'Natural Language :: English', |