Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.4 kB · 132 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133{ lib, stdenv, pkgs, buildPythonPackage, fetchFromGitHub,
# dependencies cairocffi, django, django-tagging, gunicorn, pyparsing, python-memcached, pytz, six, txamqp, urllib3, whisper,
# tests mock, redis, rrdtool, writableTmpDirAsHomeHook, python,
# passthru nixosTests,}:
buildPythonPackage { pname = "graphite-web"; version = "1.1.10-unstable-2025-02-24"; pyproject = true;
src = fetchFromGitHub { owner = "graphite-project"; repo = "graphite-web"; rev = "49c28e2015d605ad9ec93524f7076dd924a4731a"; hash = "sha256-TxsQPhnI5WhQvKKkDEYZ8xnyg/qf+N9Icej6d6A0jC0="; };
postPatch = '' substituteInPlace webapp/graphite/settings.py \ --replace-fail \ "join(WEBAPP_DIR, 'content')" \ "join('$out/webapp', 'content')" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace webapp/tests/test_dashboard.py \ --replace-fail "test_dashboard_email" "_dont_test_dashboard_email" substituteInPlace webapp/tests/test_render.py \ --replace-fail "test_render_view" "_dont_test_render_view" '';
dependencies = [ cairocffi django django-tagging gunicorn pyparsing python-memcached pytz six txamqp urllib3 whisper ];
pythonRelaxDeps = [ "django" "django-tagging" ];
env = { # Carbon-s default installation is /opt/graphite. This env variable ensures # carbon is installed as a regular Python module. GRAPHITE_NO_PREFIX = "True";
REDIS_HOST = "127.0.0.1"; };
nativeCheckInputs = [ mock redis rrdtool writableTmpDirAsHomeHook ];
preCheck = # Start a redis server '' ${pkgs.valkey}/bin/redis-server & REDIS_PID=$! '';
checkPhase = '' runHook preCheck
pushd webapp/ # avoid confusion with installed module rm -r graphite
DJANGO_SETTINGS_MODULE=tests.settings ${python.interpreter} manage.py test popd
runHook postCheck '';
postCheck = '' kill $REDIS_PID '';
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "graphite" ];
passthru.tests = { inherit (nixosTests) graphite; };
meta = { description = "Enterprise scalable realtime graphing"; homepage = "http://graphiteapp.org/"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ offline basvandijk ]; };}