depot/third_party/nixpkgs/pkgs/development/python-modules/casbin/default.nix

48 lines
890 B
Nix
Raw Normal View History

{ 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 ];
};
}