1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, simpleeval
7, wcmatch
8}:
9
10buildPythonPackage rec {
11 pname = "casbin";
12 version = "1.19.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = pname;
19 repo = "pycasbin";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-lIVZhWtGWJutmHgReT4k4G5hJZuD52AaJhwmwTmqHIY=";
22 };
23
24 propagatedBuildInputs = [
25 simpleeval
26 wcmatch
27 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 ];
32
33 pythonImportsCheck = [
34 "casbin"
35 ];
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; [ costrouc ];
43 };
44}