nixpkgs/pkgs/development/python-modules/casbin/default.nix
2022-01-23 01:09:06 +01:00

48 lines
890 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
, pythonOlder
, coveralls
, wcmatch
}:
buildPythonPackage rec {
pname = "casbin";
version = "1.15.4";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "v${version}";
sha256 = "0vczml14dvvrj401r08d6b0rfn5p5kfm1wr0vrfi8rqk2z5x1w0g";
};
propagatedBuildInputs = [
simpleeval
wcmatch
];
checkInputs = [
coveralls
];
checkPhase = ''
coverage run -m unittest discover -s tests -t tests
'';
pythonImportsCheck = [
"casbin"
];
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 = with maintainers; [ costrouc ];
};
}