88abffb7d2
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
40 lines
776 B
Nix
40 lines
776 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, simpleeval
|
|
, isPy27
|
|
, coveralls
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "casbin";
|
|
version = "1.7.0";
|
|
|
|
disabled = isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = "pycasbin";
|
|
rev = "v${version}";
|
|
sha256 = "1qwns8ph8w5bb26hzkk1dadm2bjq74g65wm6g971llb5jdq9a8z9";
|
|
};
|
|
|
|
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";
|
|
homepage = "https://github.com/casbin/pycasbin";
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.costrouc ];
|
|
};
|
|
}
|