2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
django,
|
|
|
|
djangorestframework,
|
|
|
|
python,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rules";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.5.0";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dfunckt";
|
|
|
|
repo = "django-rules";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-8Kay2b2uwaI/ml/cPpcj9svoDQI0ptV8tyGeZ76SgZw=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "rules" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
django
|
|
|
|
djangorestframework
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} tests/manage.py test testsuite -v2
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Awesome Django authorization, without the database";
|
|
|
|
homepage = "https://github.com/dfunckt/django-rules";
|
|
|
|
changelog = "https://github.com/dfunckt/django-rules/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|