1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 simpleeval,
9 wcmatch,
10}:
11
12buildPythonPackage rec {
13 pname = "pycasbin";
14 version = "2.2.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "casbin";
21 repo = "pycasbin";
22 tag = "v${version}";
23 hash = "sha256-JSaQq5BX+aXJ2iaCudzbCcMwNnf4INS/iWfMOua6fjw=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 simpleeval
30 wcmatch
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "casbin" ];
36
37 meta = with lib; {
38 description = "Authorization library that supports access control models like ACL, RBAC and ABAC";
39 homepage = "https://github.com/casbin/pycasbin";
40 changelog = "https://github.com/casbin/pycasbin/blob/${src.tag}/CHANGELOG.md";
41 license = licenses.asl20;
42 maintainers = [ ];
43 };
44}