Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394{ lib, autopep8, buildPythonPackage, django, factory-boy, fetchFromGitHub, freezegun, gprof2dot, jinja2, mock, networkx, pillow, pydot, pygments, pytestCheckHook, pytest-cov-stub, pytest-django, python, python-dateutil, pytz, requests, setuptools-scm, simplejson, sqlparse,}:
buildPythonPackage rec { pname = "django-silk"; version = "5.6.0"; format = "setuptools";
src = fetchFromGitHub { owner = "jazzband"; repo = "django-silk"; tag = version; hash = "sha256-IMJ7xm3LXDmBwXWLqWXlk/V0r9K9arhUqWeDuq4gxaM="; };
# "test_time_taken" tests aren't suitable for reproducible execution, but Django's # test runner doesn't have an easy way to ignore tests - so instead prevent it from picking # them up as tests postPatch = '' substituteInPlace project/tests/test_silky_profiler.py \ --replace "def test_time_taken" "def _test_time_taken" substituteInPlace setup.py \ --replace 'use_scm_version=True' 'version="${version}"' '';
nativeBuildInputs = [ setuptools-scm ];
buildInputs = [ mock ];
propagatedBuildInputs = [ autopep8 django gprof2dot jinja2 pillow pygments python-dateutil pytz requests simplejson sqlparse ];
nativeCheckInputs = [ freezegun networkx pydot factory-boy pytestCheckHook pytest-cov-stub pytest-django ];
pythonImportsCheck = [ "silk" ];
preCheck = '' export DB_ENGINE=sqlite3 DB_NAME=':memory:'
cd project '';
meta = { description = "Silky smooth profiling for the Django Framework"; homepage = "https://github.com/jazzband/django-silk"; changelog = "https://github.com/jazzband/django-silk/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ ris ]; };}