depot/third_party/nixpkgs/pkgs/development/python-modules/casbin/default.nix
Default email 8d28093ffb Project import generated by Copybara.
GitOrigin-RevId: 31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497
2021-09-26 14:46:18 +02:00

46 lines
848 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
, isPy27
, coveralls
, wcmatch
}:
buildPythonPackage rec {
pname = "casbin";
version = "1.9.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "v${version}";
sha256 = "01prcwkmh3a4ggzjiaai489rrpmgwvqpjcavwjxw60mspyhsbv86";
};
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 ];
};
}