1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 simpleeval,
9 wcmatch,
10}:
11
12buildPythonPackage rec {
13 pname = "casbin";
14 version = "1.36.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "casbin";
21 repo = "pycasbin";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-MeTOxDrk6pvJ1L9ZOKzWhXK8WXo0jWXGKEKR7y0ejbQ=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 propagatedBuildInputs = [
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/v${version}/CHANGELOG.md";
41 license = licenses.asl20;
42 maintainers = with maintainers; [ ];
43 };
44}