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