Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / rules / default.nix
blob3563b76affe75c4cd3965fdd907029e16ed6c2dd
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # tests
6 , django
7 , djangorestframework
8 , python
9 }:
11 buildPythonPackage rec {
12   pname = "rules";
13   version = "3.3.0";
14   format = "setuptools";
16   src = fetchFromGitHub {
17     owner = "dfunckt";
18     repo = "django-rules";
19     rev = "v${version}";
20     hash = "sha256-UFRfRwcvxEn0fD3ScJJ7f/EHd93BOpY3cEF9QDryJZY=";
21   };
23   pythonImportsCheck = [
24     "rules"
25   ];
27   nativeCheckInputs = [
28     django
29     djangorestframework
30   ];
32   checkPhase = ''
33     runHook preCheck
34     ${python.interpreter} tests/manage.py test testsuite -v2
35     runHook postCheck
36   '';
38   meta = with lib; {
39     description = "Awesome Django authorization, without the database";
40     homepage = "https://github.com/dfunckt/django-rules";
41     changelog = "https://github.com/dfunckt/django-rules/blob/${src.rev}/CHANGELOG.md";
42     license = licenses.mit;
43     maintainers = with maintainers; [ hexa ];
44   };