2019-12-16 18:24:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, simpleeval
|
|
|
|
, isPy27
|
|
|
|
, coveralls
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "casbin";
|
2021-02-05 22:31:38 +00:00
|
|
|
version = "0.16.2";
|
2019-12-16 18:24:22 +00:00
|
|
|
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = "pycasbin";
|
|
|
|
rev = "v${version}";
|
2021-02-05 22:31:38 +00:00
|
|
|
sha256 = "0jan4xikyi1p92rsir8camc6ify81wnd9l57v1pgmjf5fgb5r2w8";
|
2019-12-16 18:24:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
simpleeval
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
coveralls
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
coverage run -m unittest discover -s tests -t tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An authorization library that supports access control models like ACL, RBAC, ABAC in Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/casbin/pycasbin";
|
2019-12-16 18:24:22 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|