blob: 3563b76affe75c4cd3965fdd907029e16ed6c2dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib
, buildPythonPackage
, fetchFromGitHub
# tests
, django
, djangorestframework
, python
}:
buildPythonPackage rec {
pname = "rules";
version = "3.3.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "dfunckt";
repo = "django-rules";
rev = "v${version}";
hash = "sha256-UFRfRwcvxEn0fD3ScJJ7f/EHd93BOpY3cEF9QDryJZY=";
};
pythonImportsCheck = [
"rules"
];
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 ];
};
}
|