diff --git a/pkgs/development/python-modules/django_silk/default.nix b/pkgs/development/python-modules/django_silk/default.nix index b81e5b0927ae..0dedc4d3bb9e 100644 --- a/pkgs/development/python-modules/django_silk/default.nix +++ b/pkgs/development/python-modules/django_silk/default.nix @@ -1,42 +1,44 @@ { lib +, autopep8 , buildPythonPackage -, python -, pythonAtLeast +, contextlib2 +, django +, factory_boy , fetchFromGitHub , fetchpatch -, django +, freezegun +, gprof2dot +, jinja2 +, mock +, networkx +, pillow +, pydot , pygments -, simplejson +, python , python-dateutil +, pythonOlder +, pytz , requests , setuptools-scm +, simplejson , sqlparse -, jinja2 -, autopep8 -, pytz -, pillow -, mock -, gprof2dot -, freezegun -, contextlib2 -, networkx -, pydot -, factory_boy }: buildPythonPackage rec { pname = "django-silk"; - version = "5.0.1"; + version = "5.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # pypi tarball doesn't include test project src = fetchFromGitHub { owner = "jazzband"; repo = "django-silk"; - rev = version; - hash = "sha256-U2lj0B85cf2xu0o7enuLJB5YKaIt6gMvn+TgxleLslk="; + rev = "refs/tags/${version}"; + hash = "sha256-LzcbRZ9NLTkDTZ2eW+uXYqPbWDSdLZAJcYdD8JLuiDc="; }; - # "test_time_taken" tests aren't suitable for reproducible execution, but django's + # "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 = '' @@ -46,14 +48,40 @@ buildPythonPackage rec { --replace 'use_scm_version=True' 'version="${version}"' ''; - nativeBuildInputs = [ setuptools-scm ]; - buildInputs = [ mock ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + buildInputs = [ + mock + ]; + propagatedBuildInputs = [ - django pygments simplejson python-dateutil requests - sqlparse jinja2 autopep8 pytz pillow gprof2dot + autopep8 + django + gprof2dot + jinja2 + pillow + pygments + python-dateutil + pytz + requests + simplejson + sqlparse + ]; + + checkInputs = [ + freezegun + contextlib2 + networkx + pydot + factory_boy + ]; + + pythonImportsCheck = [ + "silk" ]; - checkInputs = [ freezegun contextlib2 networkx pydot factory_boy ]; checkPhase = '' runHook preCheck @@ -70,5 +98,4 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ ris ]; }; - }