3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/casbin/default.nix

47 lines
847 B
Nix
Raw Normal View History

2019-12-16 18:24:22 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
, isPy27
, coveralls
, wcmatch
2019-12-16 18:24:22 +00:00
}:
buildPythonPackage rec {
pname = "casbin";
2021-10-24 18:39:26 +01:00
version = "1.9.3";
2019-12-16 18:24:22 +00:00
disabled = isPy27;
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "v${version}";
2021-10-24 18:39:26 +01:00
sha256 = "sha256-PN31/1BpXcNqsqBZ8sS/MM3UL47/Bi24bUh+jGOJevk=";
2019-12-16 18:24:22 +00:00
};
propagatedBuildInputs = [
simpleeval
wcmatch
2019-12-16 18:24:22 +00:00
];
checkInputs = [
coveralls
];
checkPhase = ''
coverage run -m unittest discover -s tests -t tests
'';
pythonImportsCheck = [
"casbin"
];
2019-12-16 18:24:22 +00:00
meta = with lib; {
description = "An authorization library that supports access control models like ACL, RBAC, ABAC in Python";
homepage = "https://github.com/casbin/pycasbin";
2019-12-16 18:24:22 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ costrouc ];
2019-12-16 18:24:22 +00:00
};
}