at master 984 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # tests 10 django, 11 djangorestframework, 12 python, 13}: 14 15buildPythonPackage rec { 16 pname = "rules"; 17 version = "3.5.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "dfunckt"; 22 repo = "django-rules"; 23 tag = "v${version}"; 24 hash = "sha256-8Kay2b2uwaI/ml/cPpcj9svoDQI0ptV8tyGeZ76SgZw="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 pythonImportsCheck = [ "rules" ]; 30 31 nativeCheckInputs = [ 32 django 33 djangorestframework 34 ]; 35 36 checkPhase = '' 37 runHook preCheck 38 ${python.interpreter} tests/manage.py test testsuite -v2 39 runHook postCheck 40 ''; 41 42 meta = with lib; { 43 description = "Awesome Django authorization, without the database"; 44 homepage = "https://github.com/dfunckt/django-rules"; 45 changelog = "https://github.com/dfunckt/django-rules/blob/${src.rev}/CHANGELOG.md"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ hexa ]; 48 }; 49}